summaryrefslogtreecommitdiff
path: root/Basic.mk.template
diff options
context:
space:
mode:
authorPaul Smith <psmith@nuodb.com>2018-07-01 12:28:25 -0400
committerPaul Smith <psmith@gnu.org>2018-07-02 07:54:07 -0400
commit63b42fa235835cbeac6c1b9182f32798ea135dfd (patch)
tree69d0ded9d9a149842a889360987ab42cf6372a1f /Basic.mk.template
parenta7b0dfddac435eab6017f99f8f5cb18860fb90ac (diff)
downloadmake-git-63b42fa235835cbeac6c1b9182f32798ea135dfd.tar.gz
Convert GNU make to use the gnulib portability library
Move content from glob/* and config/* into standard GNU directory locations lib/* and m4/*. Install the gnulib bootstrap script and its configuration file, and create a bootstrap.bat file for Windows. Update the README.git file with new requirements and instructions for building from Git. At this point we only install the alloca, getloadavg, and FDL modules from gnulib. We keep our old glob/fnmatch implementation since the gnulib versions require significant amounts of infrastructure which doesn't exist on Windows yet. Further work is required here. Due to a problem with gnulib's version of getloadavg, we need to bump the minimum required version of automake to 1.16.1 unfortunately. * README.git: Update instructions * NEWS: Move developer news to a separate section * configure.ac: Update for use with gnulib modules * bootstrap: Bootstrap from Git workspace (import from gnulib) * bootstrap.conf: Bootstrap configuration for GNU make * bootstrap.bat: Bootstrap from Git workspace for Windows * gl/modules/make-glob: Support our local fnmatch/glob implementation * config/acinclude.m4: Move to m4/ * config/dospaths.m4: Move to m4/ * glob/fnmatch.c: Move to lib/ * glob/fnmatch.h.in: Move to lib/ * glob/glob.c: Move to lib/ * glob/glob.h.in: Move to lib/ * Makefile.am: Update for new directories * build.template: Update for new directories * build_w32.bat: Update for new directories * builddos.bat: Update for new directories * maintMakefile: Update for new directories * makefile.com: Update for new directories * mk/Amiga.mk: Update for new directories * mk/Posix.mk.in: Update for new directories * mk/VMS.mk: Update for new directories * mk/Windows32.mk: Update for new directories * mk/msdosdjgpp.mk: Update for new directories * po/LINGUAS: One language per line (needed by gnulib) * INSTALL: Remove (obtained from gnulib) * src/alloca.c: Remove (obtained from gnulib) * src/getloadavg.c: Remove (obtained from gnulib) * po/Makevars: Remove (created by bootstrap) * config/*: Remove leftover files * glob/*: Remove leftover files
Diffstat (limited to 'Basic.mk.template')
-rw-r--r--Basic.mk.template16
1 files changed, 11 insertions, 5 deletions
diff --git a/Basic.mk.template b/Basic.mk.template
index 4372334b..9eab3560 100644
--- a/Basic.mk.template
+++ b/Basic.mk.template
@@ -8,7 +8,7 @@
# Once you have a GNU make program created, you can use it with this makefile
# to keep it up to date if you make changes, as:
#
-# make.exe -f Makew32.mk
+# make.exe -f Basic.mk
#
# Copyright (C) 2017-2018 Free Software Foundation, Inc.
# This file is part of GNU Make.
@@ -29,7 +29,7 @@
all:
src = src/
-glob = glob/
+lib = lib/
make_SOURCES = %make_SOURCES%
glob_SOURCES = %glob_SOURCES%
@@ -57,6 +57,8 @@ PROG = $(OUTDIR)make$(EXEEXT)
prog_SOURCES = $(make_SOURCES) $(remote_SOURCES)
+BUILT_SOURCES =
+
OBJECTS = $(patsubst %.c,$(OUTDIR)%.$(OBJEXT),$(prog_SOURCES))
OBJDIRS = $(addsuffix .,$(sort $(dir $(OBJECTS))))
@@ -69,7 +71,7 @@ CPPFLAGS =
CFLAGS = -g -O2
LDFLAGS =
-extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src \
+extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(OUTDIR)lib -I$(SRCDIR)/lib \
-DLIBDIR=\"$(LIBDIR)\" -DINCLUDEDIR=\"$(INCLUDEDIR)\" -DLOCALEDIR=\"$(LOCALDIR)\"
extra_CFLAGS =
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)
@@ -93,7 +95,7 @@ MKDIR = mkdir -p
MKDIR.cmd = $(MKDIR) $@
RM = rm -f
-RM.cmd = $(RM) $(OBJECTS) $(PROG)
+RM.cmd = $(RM) $(OBJECTS) $(PROG) $(BUILT_SOURCES)
# Load overrides for the above variables.
include $(firstword $(wildcard $(SRCDIR)/mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk) $(OUTDIR)mk/Posix.mk $(SRCDIR)/mk/Posix.mk))
@@ -110,7 +112,7 @@ $(PROG): $(OBJECTS)
$(OBJECTS): $(OUTDIR)%.$(OBJEXT): %.c
$(COMPILE.cmd)
-$(OBJECTS): | $(OBJDIRS)
+$(OBJECTS): | $(OBJDIRS) $(BUILT_SOURCES)
$(OBJDIRS):
$(MKDIR.cmd)
@@ -121,4 +123,8 @@ check: $(PROG)
clean:
$(RM.cmd)
+$(filter %.h,$(BUILT_SOURCES)): %.h : %.in.h
+ $(RM) $<
+ $(CP.cmd)
+
.PHONY: all check clean