diff options
author | Paul Smith <psmith@nuodb.com> | 2018-07-01 12:28:25 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2018-07-02 07:54:07 -0400 |
commit | 63b42fa235835cbeac6c1b9182f32798ea135dfd (patch) | |
tree | 69d0ded9d9a149842a889360987ab42cf6372a1f /mk | |
parent | a7b0dfddac435eab6017f99f8f5cb18860fb90ac (diff) | |
download | make-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 'mk')
-rw-r--r-- | mk/Amiga.mk | 4 | ||||
-rw-r--r-- | mk/Posix.mk.in | 5 | ||||
-rw-r--r-- | mk/VMS.mk | 10 | ||||
-rw-r--r-- | mk/Windows32.mk | 6 | ||||
-rw-r--r-- | mk/msdosdjgpp.mk | 4 |
5 files changed, 20 insertions, 9 deletions
diff --git a/mk/Amiga.mk b/mk/Amiga.mk index 61733a3c..79f9b6ae 100644 --- a/mk/Amiga.mk +++ b/mk/Amiga.mk @@ -32,7 +32,9 @@ LDFLAGS = prog_SOURCES += $(alloca_SOURCES) $(loadavg_SOURCES) $(glob_SOURCES) $(amiga_SOURCES) -extra_CPPFLAGS = IDir $(OUTDIR)src IDir $(SRCDIR)/src IDir $(SRCDIR)/glob +BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h + +extra_CPPFLAGS = IDir $(OUTDIR)src IDir $(SRCDIR)/src IDir $(OUTDIR)lib IDir $(SRCDIR)/lib C_SOURCE = OUTPUT_OPTION = diff --git a/mk/Posix.mk.in b/mk/Posix.mk.in index 73bb645a..88ac3096 100644 --- a/mk/Posix.mk.in +++ b/mk/Posix.mk.in @@ -22,6 +22,7 @@ prog_SOURCES += $(posix_SOURCES) -extra_CPPFLAGS += @GUILE_CFLAGS@ @GLOBINC@ +extra_CPPFLAGS += @GUILE_CFLAGS@ extra_LDFLAGS += @AM_LDFLAGS@ -LDLIBS += @GUILE_LIBS@ @LIBOBJS@ @GETLOADAVG_LIBS@ @GLOBLIB@ @ALLOCA@ @LIBINTL@ @LIBS@ +LDLIBS += @LIBOBJS@ @gl_LIBOBS@ @ALLOCA@ +LDLIBS += @GUILE_LIBS@ @GETLOADAVG_LIBS@ @LIBINTL@ @LIBS@ @@ -19,7 +19,7 @@ # this program. If not, see <http://www.gnu.org/licenses/>. src = [.src] -glob = [.glob] +lib = [.lib] SRCDIR = [] OBJEXT = .obj @@ -46,7 +46,7 @@ endif extra_CPPFLAGS = /define=($(subst $s,$c,$(patsubst %,"%",$(defs)))) -cinclude = /nested=none/include=($(src),$(glob)) +cinclude = /nested=none/include=($(src),$(lib)) ifeq ($(CC),cc) cprefix = /prefix=(all,except=(glob,globfree)) cwarn = /standard=relaxed/warn=(disable=questcompare) @@ -71,8 +71,14 @@ endif # uncomment this #ALLOCA = $(alloca_SOURCES) +# If your system doesn't have alloca.h, or the one provided is bad, +# uncomment this +#BUILT_SOURCES += $(lib)alloca.h + prog_SOURCES += $(ALLOCA) $(glob_SOURCES) $(vms_SOURCES) +BUILT_SOURCES += $(lib)fnmatch.h $(lib)glob.h + COMPILE.cmd = $(CC) $(extra_CFLAGS)$(CFLAGS)/obj=$@ $(extra_CPPFLAGS)$(CPPFLAGS) $< LINK.cmd = $(LD)$(extra_LDFLAGS)$(LDFLAGS)/exe=$@ $(subst $s,$c,$^)$(LDLIBS) diff --git a/mk/Windows32.mk b/mk/Windows32.mk index d658c465..1cbe80b7 100644 --- a/mk/Windows32.mk +++ b/mk/Windows32.mk @@ -27,6 +27,8 @@ TOOLCHAIN = msvc prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES) $(w32_SOURCES) +BUILT_SOURCES += $(lib)fnmatch.h $(lib)glob.h + w32_LIBS = kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 \ oleaut32 uuid odbc32 odbccp32 @@ -39,7 +41,7 @@ msvc_CC = cl.exe msvc_LD = link.exe msvc_CPPFLAGS = /DHAVE_CONFIG_H /DWINDOWS32 /DWIN32 /D_CONSOLE -msvc_CPPFLAGS += /I$(OUTDIR)src /I$(SRCDIR)/src /I$(SRCDIR)/glob /I$(SRCDIR)/src/w32/include +msvc_CPPFLAGS += /I$(OUTDIR)src /I$(SRCDIR)/src /I$(SRCDIR)/src/w32/include /I$(OUTDIR)lib /I$(SRCDIR)/lib msvc_CFLAGS = /nologo /MT /W4 /EHsc msvc_CFLAGS += /FR$(OUTDIR) /Fp$(BASE_PROG).pch /Fd$(BASE_PROG).pdb @@ -68,7 +70,7 @@ gcc_LD = $(gcc_CC) release_gcc_OUTDIR = ./GccRel/ debug_gcc_OUTDIR = ./GccDebug/ -gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(SRCDIR)/glob -I$(SRCDIR)/src/w32/include +gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(SRCDIR)/src/w32/include -I$(OUTDIR)lib -I$(SRCDIR)/lib gcc_CFLAGS = -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 gcc_LDFLAGS = -mthreads -gdwarf-2 -g3 gcc_LDLIBS = $(addprefix -l,$(w32_libs)) diff --git a/mk/msdosdjgpp.mk b/mk/msdosdjgpp.mk index cec58ef9..2da5bc50 100644 --- a/mk/msdosdjgpp.mk +++ b/mk/msdosdjgpp.mk @@ -25,12 +25,12 @@ CC = gcc prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES) +BUILT_SOURCES += $(lib)fnmatch.h $(lib)glob.h + INCLUDEDIR = c:/djgpp/include LIBDIR = c:/djgpp/lib LOCALEDIR = c:/djgpp/share -extra_CPPFLAGS = -I$(SRCDIR)/glob - MKDIR = command.com /c mkdir MKDIR.cmd = $(MKDIR) $(subst /,\\,$@) |