Remove unsupported build facilities.

Over time the non-standard build and install systems (nmake files,
smake files, Visual Studio project files, etc.) have atrophied and
maintaining them is not worth the effort, for such a simple utility
as make.  Remove all the non-standard build tool support and unify
OS-specific build rules under a basic set of (GNU make) makefiles.

Preserve the existing bootstrapping scripts (for POSIX, Windows,
and MS-DOS).  Also the existing VMS build scripts are left unchanged:
I don't have enough experience with VMS to venture into this area.
Perhaps one of the VMS maintainers might like to determine whether
conversion would be appropriate.

Rather than create libraries for w32 and glob (non-POSIX), simply
link the object files directly to remove the complexity.

* NEWS: Update with user-facing notes.
* Makefile.am: Clean up to use the latest automake best practices.
Build Windows code directly from the root makefile to avoid recursion.
* README.Amiga, README.DOS.template, README.W32.template: Updated.
* INSTALL: Point readers at the README.git file.
* maintMakefile: Remove obsolete files.  Create Basic.mk file.
* Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles.
* build_w32.bat: Copy Basic.mk to Makefile
* configure.ac: We no longer need AM_PROG_AR.
* dosbuild.bat: Rename to builddos.bat.  Incorporate configure.bat.
* Makefile.DOS.template: Remove.
* NMakefile.template, w32/subproc/NMakefile: Remove.
* SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove.
* configure.bat, glob/configure.bat: Remove.
* w32/Makefile.am: Remove.
* make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
This commit is contained in:
Paul Smith 2017-11-12 17:44:38 -05:00
parent a7e0dd98e4
commit aa44e66c8f
32 changed files with 554 additions and 1821 deletions

5
.gitignore vendored
View file

@ -3,6 +3,7 @@ ID
TAGS
.*gdbinit
.gdb_history
.vscode
*~
#*
.#*
@ -11,6 +12,7 @@ TAGS
ABOUT-NLS
Makefile
Makefile.in
Basic.mk
aclocal.m4
autom4te.cache
config.cache
@ -44,13 +46,10 @@ GccRel/
.dep_segment
.check-git-HEAD
ChangeLog
Makefile.DOS
NMakefile
README
README.DOS
README.OS2
README.W32
SMakefile
build.sh
build.sh.in
config.ami

103
Basic.mk.template Normal file
View file

@ -0,0 +1,103 @@
# Basic GNU -*-Makefile-*- to build GNU make
#
# NOTE:
# If you have no 'make' program at all to process this makefile:
# * On Windows, run ".\buildw32.bat" to bootstrap one.
# * On MS-DOS, run ".\builddos.bat" to bootstrap one.
#
# 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
#
# Copyright (C) 2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
all:
make_SOURCES = %make_SOURCES% remote-stub.c
glob_SOURCES = %glob_SOURCES%
w32_SOURCES = %w32_SOURCES%
vms_SOURCES = %vms_SOURCES%
amiga_SOURCES = %amiga_SOURCES%
OUTDIR = .
SRCDIR = .
OBJEXT = o
EXEEXT =
PROG = $(OUTDIR)/make$(EXEEXT)
LD = $(CC)
# Reserved for command-line override
CPPFLAGS =
CFLAGS = -g -O2
LDFLAGS =
prog_SOURCES = $(make_SOURCES)
extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR) -I$(SRCDIR)
extra_CFLAGS =
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)
C_SOURCE = -c
OUTPUT_OPTION = -o $@
LINK_OUTPUT = -o $@
# Command lines
COMPILE.cmd = $(CC) $(extra_CFLAGS) $(CFLAGS) $(extra_CPPFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OUTPUT_OPTION) $(C_SOURCE) $<
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) $(LINK_OUTPUT)
CHECK.cmd = cd tests && ./run_make_tests -make $(shell cd $(<D) && pwd)/$(<F)
MKDIR = mkdir -p
MKDIR.cmd = $(MKDIR) $@
RM = rm -f
RM.cmd = $(RM) $(OBJECTS) $(PROG)
# Load overrides for the above variables.
include $(wildcard mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk))
VERSION = %VERSION%
VPATH = $(SRCDIR)
all: $(PROG)
OBJECTS = $(patsubst %.c,$(OUTDIR)/%.$(OBJEXT),$(prog_SOURCES))
$(PROG): $(OBJECTS)
$(LINK.cmd)
.SECONDEXPANSION:
$(OBJECTS): $(OUTDIR)/%.$(OBJEXT): %.c | $$(@D)/.
$(COMPILE.cmd)
$(addsuffix .,$(sort $(dir $(OBJECTS)))):
$(MKDIR.cmd)
check: $(PROG)
$(CHECK.cmd)
clean:
$(RM.cmd)
.PHONY: all check clean

10
INSTALL
View file

@ -7,6 +7,15 @@ Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Installation From Git
=====================
If you are trying to build GNU make from a Git clone rather than a
downloaded source distribution file, see README.git for steps you
must take to configure your workspace before you can use the
instructions below.
Basic Installation
==================
@ -228,4 +237,3 @@ overridden in the site shell script).
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View file

@ -1,587 +0,0 @@
# -*-Makefile-*- template for DJGPP
# Makefile.in generated automatically by automake 1.2 from Makefile.am
#
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
SHELL = /bin/sh
srcdir = .
VPATH = $(srcdir)
# $DJDIR is defined automatically by DJGPP to point
# to the root of the DJGPP installation tree.
prefix = /dev/env/DJDIR
exec_prefix = ${prefix}
bindir = /bin
datadir = /share
libdir = /lib
infodir = /info
mandir = /man
includedir = /include
oldincludedir = c:/djgpp/include
DESTDIR = /dev/env/DJDIR
pkgdatadir = $(datadir)/make
pkglibdir = $(libdir)/make
pkgincludedir = $(includedir)/make
localedir = $(datadir)/locale
INSTALL = ${exec_prefix}/bin/ginstall -c
INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
transform = s,x,x,
# This will fail even if they don't have a Unix-like shell (stock DOS
# shell doesn't know about `false'). The only difference is that they
# get "Error -1" instead of "Error 1".
EXIT_FAIL = false
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXEEXT = .exe
OBJEXT = o
AR = ar
AWK = gawk
CC = gcc
CPP = gcc -E
LIBOBJS =
MAKEINFO = ${exec_prefix}/bin/makeinfo
PACKAGE = make
PERL = perl
RANLIB = ranlib
REMOTE = stub
VERSION = %VERSION%
AUTOMAKE_OPTIONS = 1.2
bin_PROGRAMS = %PROGRAMS%$(EXEEXT)
make_SOURCES = %SOURCES%
# This should include the glob/ prefix
libglob_a_SOURCES = %GLOB_SOURCES%
make_LDADD = glob/libglob.a
man_MANS = make.1
INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(prefix)$(libdir)\" -DINCLUDEDIR=\"$(prefix)$(includedir)\" -DLOCALEDIR=\"$(prefix)$(localedir)\"
BUILT_SOURCES = README build.sh-in
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms README.VMS vmsdir.h vmsfunctions.c vmsify.c gmk-default.scm gmk-default.h
SUBDIRS = glob doc
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = build.sh
PROGRAMS = $(bin_PROGRAMS)
MAKE_HOST = i386-pc-msdosdjgpp
DEFS = -I. -I$(srcdir) -I.
CPPFLAGS = -DHAVE_CONFIG_H
LDFLAGS =
LIBS =
make_OBJECTS = %OBJECTS%
make_DEPENDENCIES = glob/libglob.a
make_LDFLAGS =
libglob_a_LIBADD =
libglob_a_OBJECTS = %GLOB_OBJECTS%
noinst_LIBRARIES = glob/libglob.a
CFLAGS = -O2 -g
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
TEXI2DVI = texi2dvi
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
INFO_DEPS = doc/make.info
DVIS = doc/make.dvi
TEXINFOS = doc/make.texi
noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
man1dir = $(mandir)/man1
MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.ac getloadavg.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP = --best
SOURCES = $(make_SOURCES)
OBJECTS = $(make_OBJECTS)
HEADERS = $(wildcard $(srcdir)/*.h)
default: all
.SUFFIXES:
.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do if test -f $$p; then echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`"; $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; else :; fi; done
uninstall-binPROGRAMS:
$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`.exe; done
.c.o:
$(COMPILE) -c $<
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
mostlyclean-compile:
-rm -f *.$(OBJEXT) *$(EXEEXT) make.new core
clean-compile:
distclean-compile:
-rm -f *.tab.c *_tab.c
maintainer-clean-compile:
make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
@command.com /c if exist make del make
@command.com /c if exist make.exe del make.exe
$(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
# Documentation
make.info: make.texi
make.dvi: make.texi
make.ps: make.dvi make.texi
make.html: make.texi
DVIPS = dvips
.texi.info:
@command.com /c if exist make.info* del make.info*
@command.com /c if exist make.i* del make.i*
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
.texi:
@command.com /c if exist make.info* del make.info*
@command.com /c if exist make.i* del make.i*
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
.texi.dvi:
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.dvi.ps:
$(DVIPS) $< -o $@
# Other documentation formats
html: html-recursive
.texi.html:
@command.com /c if exist make.html* del make.html*
$(MAKEINFO) --html -I$(srcdir) --no-split $< -o ./$@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(infodir)
@for file in $(INFO_DEPS); do iifile=`echo $$file | sed "s|doc/||"`; d=$(srcdir); for ifile in `cd $$d && echo $$file`; do if test -f $$d/$$ifile; then echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile"; $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile; else : ; fi; done; done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then for file in $(INFO_DEPS); do iifile=`echo $$file | sed "s|doc/||"`; echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile"; install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile || :; done; else : ; fi
uninstall-info:
$(PRE_UNINSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then ii=yes; else ii=; fi; for file in $(INFO_DEPS); do test -z $ii || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; done
$(NORMAL_UNINSTALL)
for file in $(INFO_DEPS); do (cd $(DESTDIR)$(infodir) && rm -f $$file); done
dist-info: $(INFO_DEPS)
for base in $(INFO_DEPS); do d=$(srcdir); for file in `cd $$d && eval echo $$base*`; do test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; done
mostlyclean-aminfo:
-rm -f $(srcdir)/doc/make.aux $(srcdir)/doc/make.cp $(srcdir)/doc/make.cps $(srcdir)/doc/make.dvi \
$(srcdir)/doc/make.fn $(srcdir)/doc/make.fns $(srcdir)/doc/make.ky $(srcdir)/doc/make.kys \
$(srcdir)/doc/make.ps $(srcdir)/doc/make.log $(srcdir)/doc/make.pg $(srcdir)/doc/make.toc \
$(srcdir)/doc/make.tp $(srcdir)/doc/make.tps $(srcdir)/doc/make.vr $(srcdir)/doc/make.vrs \
$(srcdir)/doc/make.op $(srcdir)/doc/make.tr $(srcdir)/doc/make.cv $(srcdir)/doc/make.cn \
$(srcdir)/doc/make.html
clean-aminfo:
distclean-aminfo:
maintainer-clean-aminfo:
for i in $(INFO_DEPS); do rm -f $$i*; done
install-man1:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
uninstall-man1:
@list='$(man1_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
install-man: $(MANS)
@$(NORMAL_INSTALL)
$(MAKE) install-man1
uninstall-man:
@$(NORMAL_UNINSTALL)
$(MAKE) uninstall-man1
# Assume that the only thing to do in glob is to build libglob.a,
# but do a sanity check: if $SUBDIRS will ever have more than
# a single directory, yell bloody murder.
all-recursive:
ifeq ($(findstring glob, $(SUBDIRS)), glob)
@command.com /c if not exist glob\\nul md glob
@echo Making all in glob
$(MAKE) -C glob -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a
endif
$(SUBDIRS):
command.com /c md $@
libglob.a: $(libglob_a_OBJECTS)
command.com /c if exist libglob.a del libglob.a
$(AR) cru libglob.a $(libglob_a_OBJECTS) $(libglob_a_LIBADD)
$(RANLIB) libglob.a
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive check-recursive:
ifeq ($(words $(SUBDIRS)), 2)
@echo Making $(shell echo $@ | sed s/-recursive//) in glob
$(MAKE) -C glob -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
@echo Making $(shell echo $@ | sed s/-recursive//) in doc
$(MAKE) -C doc -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
else
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
@$(EXIT_FAIL)
endif
tags-in-glob: $(libglob_a_SOURCES)
etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
tags-recursive:
ifeq ($(words $(SUBDIRS)), 2)
$(MAKE) tags-in-glob
else
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
@$(EXIT_FAIL)
endif
tags: TAGS
ID: $(HEADERS) $(SOURCES)
mkid $(srcdir)/$(SOURCES) $(srcdir)/$(libglob_a_SOURCES) ./config.h $(HEADERS)
TAGS: tags-recursive $(HEADERS) $(srcdir)/$(SOURCES) config.h $(TAGS_DEPENDENCIES)
etags -i ./glob/TAGS $(ETAGS_ARGS) $(srcdir)/$(SOURCES) ./config.h $(HEADERS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
rm -rf $(distdir)
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; cd $(distdir)/=build && ../configure --srcdir=.. --prefix=$$dc_install_base && $(MAKE) && $(MAKE) dvi && $(MAKE) check && $(MAKE) install && $(MAKE) installcheck && $(MAKE) dist
rm -rf $(distdir)
@echo "========================"; echo "$(distdir).tar.gz is ready for distribution"; echo "========================"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
rm -rf $(distdir)
distdir: $(DISTFILES)
rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit 1; done
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
info: info-recursive
info-recursive:
ifeq ($(findstring doc, $(SUBDIRS)), doc)
@command.com /c if not exist doc\\nul md doc
@echo Making all in doc
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.info
endif
dvi: dvi-recursive
dvi-recursive:
ifeq ($(findstring doc, $(SUBDIRS)), doc)
@command.com /c if not exist doc\\nul md doc
@echo Making all in doc
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.dvi
endif
ps: ps-recursive
ps-recursive:
ifeq ($(findstring doc, $(SUBDIRS)), doc)
@command.com /c if not exist doc\\nul md doc
@echo Making all in doc
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.ps
endif
html-recursive:
ifeq ($(findstring doc, $(SUBDIRS)), doc)
@command.com /c if not exist doc\\nul md doc
@echo Making all in doc
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.html
endif
check: all-am check-recursive check-local
@:
installcheck: installcheck-recursive
all-recursive-am: config.h
$(MAKE) all-recursive
all-am: Makefile $(PROGRAMS) config.h info
install-exec-am: install-binPROGRAMS
install-data-am: install-info-am
uninstall-am: uninstall-binPROGRAMS uninstall-info
install-exec: install-exec-recursive install-exec-am
@$(NORMAL_INSTALL)
install-data: install-data-recursive install-data-am
@$(NORMAL_INSTALL)
install-recursive uninstall-recursive:
@:
install: install-recursive install-exec-am install-data-am
@:
uninstall: uninstall-recursive uninstall-am
all: all-recursive-am all-am
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs: installdirs-recursive
$(mkinstalldirs) $(bindir) $(infodir)
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(DISTCLEANFILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS mostlyclean-compile mostlyclean-aminfo mostlyclean-tags mostlyclean-generic
clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo clean-tags clean-generic mostlyclean-am
distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile distclean-aminfo distclean-tags distclean-generic clean-am
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS maintainer-clean-compile maintainer-clean-aminfo maintainer-clean-tags maintainer-clean-generic distclean-am
mostlyclean: mostlyclean-recursive mostlyclean-am
clean: clean-noinstLIBRARIES clean-recursive clean-am
distclean: distclean-recursive distclean-am
rm -f config.status
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f config.status
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile install-info-am uninstall-info \
mostlyclean-aminfo distclean-aminfo clean-aminfo \
maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive check-am \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info dvi check-local installcheck \
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean \
html
# --------------- Local DIST Section
# Install the w32 subdirectory
#
dist-hook:
(cd $(srcdir); \
w32=`find w32 -follow \( -name .git -prune \) -o -type f -print`; \
tar chf - $$w32) \
| (cd $(distdir); tar xfBp -)
# --------------- Local CHECK Section
# Note: check-loadavg is NOT a prerequisite of check-local, since
# there's no uptime utility, and the test it does doesn't make sense
# on MSDOS anyway.
check-local: check-shell check-regression
@banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
echo
.PHONY: check-loadavg check-shell check-regression
# > check-shell
#
# check-shell is designed to fail if they don't have a Unixy shell
# installed. The test suite requires such a shell.
check-shell:
@echo If Make says Error -1, you do not have Unix-style shell installed
@foo=bar.exe :
# > check-loadavg
#
loadavg: loadavg.c config.h
@rm -f loadavg
$(LINK) -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
# We copy getloadavg.c into a different file rather than compiling it
# directly because some compilers clobber getloadavg.o in the process.
loadavg.c: getloadavg.c
ln $(srcdir)/getloadavg.c loadavg.c || \
cp $(srcdir)/getloadavg.c loadavg.c
check-loadavg: loadavg
@echo The system uptime program believes the load average to be:
-uptime
@echo The GNU load average checking code believes:
-./loadavg
# > check-regression
#
# Look for the make test suite, and run it if found. Look in MAKE_TEST if
# specified, or else in the srcdir or the distdir, their parents, and _their_
# parents.
#
check-regression:
@if test -f "$(srcdir)/tests/run_make_tests"; then \
if $(PERL) -v >/dev/null 2>&1; then \
case `cd $(srcdir); pwd` in `pwd`) : ;; \
*) test -d tests || mkdir tests; \
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
rm -rf tests/$$f; cp -pr $(srcdir)/tests/$$f tests; \
done ;; \
esac; \
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS)"; \
cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS); \
else \
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
fi; \
else \
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
fi
# --------------- Maintainer's Section
# Note this requires GNU make. Not to worry, since it will only be included
# in the Makefile if we're in the maintainer's environment.
#include $(srcdir)/maintMakefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# --------------- DEPENDENCIES

View file

@ -16,84 +16,89 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options subdir-objects
ACLOCAL_AMFLAGS = -I config
MAKE_HOST = @MAKE_HOST@
# Only process if target is MS-Windows
if WINDOWSENV
MAYBE_W32 = w32
W32INC = -I $(top_srcdir)/w32/include
W32LIB = -Lw32 -lw32
ossrc =
else
ossrc = posixos.c
endif
SUBDIRS = glob config po doc $(MAYBE_W32)
SUBDIRS = glob config po doc
bin_PROGRAMS = make
include_HEADERS = gnumake.h
if USE_CUSTOMS
remote = remote-cstms.c
else
remote = remote-stub.c
endif
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
function.c getopt.c getopt1.c guile.c implicit.c job.c load.c \
loadapi.c main.c misc.c $(ossrc) output.c read.c remake.c \
rule.c signame.c strcache.c variable.c version.c vpath.c \
hash.c $(remote)
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
debug.h getopt.h gettext.h hash.h output.h os.h
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
$(GUILE_LIBS)
# Only process if target is MS-Windows
if WINDOWSENV
make_LDADD += $(W32LIB)
endif
man_MANS = make.1
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
make_SRCS = ar.c arscan.c commands.c commands.h debug.h default.c dep.h \
dir.c expand.c file.c filedef.h function.c getopt.c getopt.h \
getopt1.c gettext.h guile.c hash.c hash.h implicit.c job.c \
job.h load.c loadapi.c main.c makeint.h misc.c os.h output.c \
output.h read.c remake.c rule.c rule.h signame.c strcache.c \
variable.c variable.h version.c vpath.c
glob_SRCS = glob/fnmatch.c glob/fnmatch.h glob/glob.c glob/glob.h
w32_SRCS = w32/pathstuff.c w32/w32os.c w32/compat/dirent.c \
w32/compat/posixfcn.c w32/include/dirent.h w32/include/dlfcn.h \
w32/include/pathstuff.h w32/include/sub_proc.h \
w32/include/w32err.h w32/subproc/misc.c w32/subproc/proc.h \
w32/subproc/sub_proc.c w32/subproc/w32err.c
vms_SRCS = vms_exit.c vms_export_symbol.c vms_progname.c vmsdir.h \
vmsfunctions.c vmsify.c vmsjobs.c
amiga_SRCS = amiga.c amiga.h
make_SOURCES = $(make_SRCS)
EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
make_LDADD = $(GUILE_LIBS) $(LIBOBJS) $(ALLOCA) $(GLOBLIB) \
@GETLOADAVG_LIBS@ @LIBINTL@
localedir = $(datadir)/locale
AM_CPPFLAGS = -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \
-DLOCALEDIR=\"$(localedir)\" $(GLOBINC)
AM_CPPFLAGS = $(GLOBINC)
AM_CFLAGS = $(GUILE_CFLAGS)
# Only process if target is MS-Windows
if WINDOWSENV
AM_CPPFLAGS += $(W32INC)
make_SOURCES += $(w32_SRCS)
AM_CPPFLAGS += -I $(top_srcdir)/w32/include
else
make_SOURCES += posixos.c
endif
if USE_CUSTOMS
make_SOURCES += remote-cstms.c
else
make_SOURCES += remote-stub.c
endif
# Extra stuff to include in the distribution.
mk_FILES = Basic.mk mk/Amiga.mk mk/Windows32.mk mk/msdosdjgpp.mk
# test/scripts are added via dist-hook below.
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
tests/run_make_tests.pl tests/test_driver.pl \
tests/config-flags.pm.in tests/config_flags_pm.com \
tests/mkshadow tests/jhelp.pl tests/guile.supp tests/README
EXTRA_DIST = ChangeLog README build.sh.in $(man_MANS) \
README.customs README.OS2 \
SCOPTIONS SMakefile \
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
make_msvc_net2003.sln make_msvc_net2003.vcproj \
README.Amiga SCOPTIONS config.ami \
README.DOS builddos.bat configh.dos \
README.W32 config.h.W32 build_w32.bat \
README.VMS makefile.vms makefile.com config.h-vms \
vmsdir.h vmsfunctions.c vmsify.c vms_exit.c vms_progname.c \
vms_export_symbol.c vms_export_symbol_test.com \
gmk-default.scm gmk-default.h
vms_export_symbol_test.com \
gmk-default.scm gmk-default.h \
$(mk_FILES) $(test_FILES)
# This is built during configure, but behind configure's back
DISTCLEANFILES = build.sh
# --------------- Internationalization Section
localedir = $(datadir)/locale
# --------------- Local INSTALL Section
# If necessary, change the gid of the app and turn on the setgid flag.
@ -101,7 +106,7 @@ localedir = $(datadir)/locale
# Whether or not make needs to be installed setgid.
# The value should be either 'true' or 'false'.
# On many systems, the getloadavg function (used to implement the '-l'
# On some systems, the getloadavg function (used to implement the '-l'
# switch) will not work unless make is installed setgid kmem.
#
inst_setgid = @NEED_SETGID@
@ -134,11 +139,11 @@ gmk-default.h: $(srcdir)/gmk-default.scm
# --------------- Local DIST Section
# Install the w32 and tests subdirectories
# Install the mk and tests subdirectories
#
dist-hook:
(cd $(srcdir); \
sub=`find w32 tests -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name Makefile \) -prune -o -type f -print`; \
sub=`find tests/scripts -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name \*.out -o -name Makefile \) -prune -o -type f -print`; \
tar chf - $$sub) \
| (cd $(distdir); tar xfBp -)

8
NEWS
View file

@ -35,6 +35,14 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set
already contains some value. Similarly, appending an empty string does not
add a trailing space.
* WARNING: Backward-incompatibility!
On Linux, and other systems that provide a /proc/loadavg with similar
syntax, the -l/--load-average option will use the contents of that file to
determine how many jobs are running at any given instant, and compare that
value to the load value requested. This allows usage such as "-j -lN" for
N-processor systems with less fear of overload.
Patch provided by Sven C. Dack <sven.c.dack@sky.com>
* The previous limit of 63 jobs under -jN on MS-Windows is now
increased to 4095. That limit includes the subprocess started by
the $(shell) function.

View file

@ -1,132 +0,0 @@
# -*-Makefile-*- to build GNU make with nmake
#
# NOTE: If you have no 'make' program at all to process this makefile,
# run 'build_w32.bat' instead.
#
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
LINK = link
CC = cl
MAKE = nmake
OUTDIR=.
MAKEFILE=NMakefile
SUBPROC_MAKEFILE=NMakefile
CFLAGS_any = /nologo /MT /W4 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
/STACK:0x400000 /INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
/STACK:0x400000 /INCREMENTAL:no /OUT:WinRel/make.exe
all: config.h subproc Release Debug
#
# Make sure we build the subproc library first. It has it's own
# makefile. To be portable to Windows 95, we put the instructions
# on how to build the library into a batch file. On NT, we could
# simply have done foo && bar && dog, but this doesn't port.
#
subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: w32/subproc/misc.c w32/subproc/sub_proc.c w32/subproc/w32err.c
subproc.bat $(SUBPROC_MAKEFILE) $(MAKE)
if exist WinDebug\make.exe erase WinDebug\make.exe
if exist WinRel\make.exe erase WinRel\make.exe
config.h: config.h.W32
copy $? $@
Release:
$(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
Debug:
$(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
clean:
if exist WinDebug\nul rmdir /s /q WinDebug
if exist WinRel\nul rmdir /s /q WinRel
if exist w32\subproc\WinDebug\nul rmdir /s /q w32\subproc\WinDebug
if exist w32\subproc\WinRel\nul rmdir /s /q w32\subproc\WinRel
if exist config.h erase config.h
erase *.pdb
$(OUTDIR):
if not exist .\$@\nul mkdir .\$@
LIBS = kernel32.lib user32.lib advapi32.lib
guile = $(OUTDIR)/guile.obj
OBJS = \
$(OUTDIR)/ar.obj \
$(OUTDIR)/arscan.obj \
$(OUTDIR)/commands.obj \
$(OUTDIR)/default.obj \
$(OUTDIR)/dir.obj \
$(OUTDIR)/expand.obj \
$(OUTDIR)/file.obj \
$(OUTDIR)/function.obj \
$(OUTDIR)/getloadavg.obj \
$(OUTDIR)/getopt.obj \
$(OUTDIR)/getopt1.obj \
$(OUTDIR)/hash.obj \
$(OUTDIR)/implicit.obj \
$(OUTDIR)/job.obj \
$(OUTDIR)/load.obj \
$(OUTDIR)/main.obj \
$(OUTDIR)/misc.obj \
$(OUTDIR)/output.obj \
$(OUTDIR)/read.obj \
$(OUTDIR)/remake.obj \
$(OUTDIR)/remote-stub.obj \
$(OUTDIR)/rule.obj \
$(OUTDIR)/signame.obj \
$(OUTDIR)/strcache.obj \
$(OUTDIR)/variable.obj \
$(OUTDIR)/version.obj \
$(OUTDIR)/vpath.obj \
$(OUTDIR)/glob.obj \
$(OUTDIR)/fnmatch.obj \
$(OUTDIR)/dirent.obj \
$(OUTDIR)/pathstuff.obj \
$(OUTDIR)/posixfcn.obj \
$(OUTDIR)/w32os.obj \
$(guile)
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
$(LINK) @<<
$(LDFLAGS) $(LIBS) $(OBJS)
<<
.c{$(OUTDIR)}.obj:
$(CC) $(CFLAGS) /c $<
$(OUTDIR)/glob.obj : glob/glob.c
$(CC) $(CFLAGS) /c $?
$(OUTDIR)/fnmatch.obj : glob/fnmatch.c
$(CC) $(CFLAGS) /c $?
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
$(CC) $(CFLAGS) /c $?
$(OUTDIR)/posixfcn.obj : w32/compat/posixfcn.c
$(CC) $(CFLAGS) /c $?
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
$(CC) $(CFLAGS) /c $?
$(OUTDIR)/w32os.obj : w32/w32os.c
$(CC) $(CFLAGS) /c $?

View file

@ -42,15 +42,18 @@ place). You have to use "$(wildcard src/*.c)" instead.
COMPILING FROM SCRATCH
----------------------
To recompile, you need SAS/C 6.51. make itself is not necessary, there
is an smakefile.
To recompile, you need SAS/C 6.51.
1. Copy config.ami to config.h
2. If you use make to compile, copy Makefile.ami to Makefile and
glob/Makefile.ami to glob/Makefile. Copy make into the current
directory.
As of GNU make 4.3, the build environment has been cleaned up and alternate
make files (including smakefiles) have been removed. If you have an existing
version of GNU make available you _should_ be able to run:
3. Run smake/make
make -f Basic.mk
However this is untested.
If you have an Amiga system and would like to collaborate on getting
bootstrapping to work properly please contact bug-make@gnu.org.
INSTALLATION

View file

@ -27,8 +27,8 @@ New (since 3.74) DOS-specific features:
8. Can be built without (a previous version of) Make.
9. The build process requires only standard tools. (Optional
targets like "install:" and "clean:" still need additional
programs, though, see below.)
targets like "check:" still need additional programs, though,
see below.)
10. Beginning with v3.78, the test suite works in the DJGPP
environment (requires Perl and auxiliary tools; see below).
@ -55,72 +55,34 @@ To build from sources:
either DJTAR (which is part of the DJGPP development
environment), or the DJGPP port of GNU Tar.
2. Invoke the 'configure.bat' batch file.
2. If you have a working Make already, you can run:
If you are building Make in-place, i.e. in the same directory
where its sources are kept, just type "configure.bat" and press
[Enter]. Otherwise, you need to supply the path to the source
directory as an argument to the batch file, like this:
make -f Basic.mk
c:\djgpp\gnu\make-%VERSION%\configure.bat c:/djgpp/gnu/make-%VERSION%
3. If you don't have a working Make already you can bootstrap one
by running:
Note the forward slashes in the source path argument: you MUST
use them here.
.\builddos.bat
3. If configure.bat doesn't find a working Make, it will suggest to
use the 'dosbuild.bat' batch file to build Make. Either do as it
suggests or install another Make program (a pre-compiled binary
should be available from the usual DJGPP sites) and rerun
configure.bat.
4. Invoke Make.
If you are building from outside of the source directory, you
4. If you are building from outside of the source directory, you
need to tell Make where the sources are, like this:
make srcdir=c:/djgpp/gnu/make-%VERSION%
make srcdir=c:/djgpp/gnu/make
(configure.bat will tell you this when it finishes). You MUST
use a full, not relative, name of the source directory here, or
else Make might fail.
or:
5. After Make finishes, if you have a Unix-style shell installed,
you can use the 'install' target to install the package. You
will also need GNU Fileutils and GNU Sed for this (they should
be available from the DJGPP sites).
c:/djgpp/gnu/make/builddos.bat c:/djgpp/gnu/make
By default, GNU make will install into your DJGPP installation
area. If you wish to use a different directory, override the
DESTDIR variable when invoking "make install", like this:
make install DESTDIR=c:/other/dir
This causes the make executable to be placed in c:/other/dir/bin,
the man pages in c:/other/dir/man, etc.
Without a Unix-style shell, you will have to install programs
and the docs manually. Copy make.exe to a directory on your
PATH, make.i* info files to your Info directory, and update the
file 'dir' in your Info directory by adding the following item
to the main menu:
* Make: (make.info). The GNU make utility.
If you have the 'install-info' program (from the GNU Texinfo
package), it will do that for you if you invoke it like this:
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
(If your Info directory is other than C:\DJGPP\INFO, change this
command accordingly.)
6. The 'clean' targets also require Unix-style shell, and GNU Sed
and 'rm' programs (the latter from Fileutils).
7. To run the test suite, type "make check". This requires a Unix
5. To run the test suite, type "make check". This requires a Unix
shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
and Sh-utils.
6. To install copy make.exe to the preferred location.
Since GNU make 4.3, support for customized platform installations
has been removed. If you'd like to collaborate on reinstating
these capabilities, contact bug-make@gnu.org.
Notes:
-----

View file

@ -41,14 +41,6 @@ Do this first, regardless of the build method you choose:
case, while Makefile rules are written for lower-case versions.)
Using make_msvc_net2003.vcproj
------------------------------
2. Open make_msvc_net2003.vcproj in MSVS71 or MSVC71 or any compatible IDE,
then build this project as usual. There's also a solution file for
Studio 2003.
Building with (MinGW-)GCC using build_w32.bat
---------------------------------------------
@ -58,8 +50,9 @@ Building with (MinGW-)GCC using build_w32.bat
.\build_w32.bat gcc
This produces gnumake.exe in the GccRel directory.
If you want a version of GNU make built with debugging enabled,
add the --debug option.
add the --debug option. Output goes into the GccDebug directory.
The batch file will probe for Guile installation, and will build
gnumake.exe with Guile if it finds it. If you have Guile
@ -82,7 +75,8 @@ Building with (MSVC++-)cl using build_w32.bat
If you want a 32bit version of GNU make, add the --x86 option.
If you want a Debug build of GNU make, add the --debug option.
If you want a Debug build of GNU make, add the --debug option. Output
will go into the .\WinDebug directory.
The batch file will probe for Guile installation, and will build
gnumake.exe with Guile if it finds it. If Guile is installed,
@ -90,18 +84,46 @@ Building with (MSVC++-)cl using build_w32.bat
--without-guile option.
Building with (MSVC++-)cl using NMakefile
-----------------------------------------
Building with (MinGW-)GCC using GNU make
----------------------------------------
2. Open a W32 command prompt for your installed (MSVC++-)cl, setup a
correct PATH and other environment variables for it (usually via
executing vcvars32.bat or vsvars32.bat from the cl-installation, or
using a corresponding start menu entry from the cl-installation),
then execute ...
2. If you already have a version of GNU make available you can use it
to build this version. Open a W32 command prompt for your installed
(MinGW-)GCC, setup a correct PATH and other environment variables
for it, then execute ...
nmake /f NMakefile
make -f Basic.mk TOOLCHAIN=gcc
(this produces WinDebug/make.exe and WinRel/make.exe).
This produces GccRel\gnumake.exe.
If you want a version of GNU make built with debugging enabled,
add the TARGET_TYPE=debug option:
make -f Basic.mk TOOLCHAIN=gcc TARGET_TYPE=debug
The makefile doesn't support Guile integration. Use build_w32.bat
if you want to build with Guile support.
Building with (MSVC++-)cl using GNU make
----------------------------------------
2. If you already have a version of GNU make available you can use it
to build this version. Open a W32 command prompt for your installed
(MSVC++-)cl, setup a correct PATH and other environment variables
for it (usually via executing vcvars32.bat or vsvars32.bat from the
cl-installation, or using a corresponding start menu entry from the
cl-installation), then execute ...
make -f Basic.mk
This produces an optimized WinRel/gnumake.exe.
If you want a version of GNU make built with debugging enabled,
add the TARGET_TYPE=debug option:
make -f Basic.mk TARGET_TYPE=debug
The makefile doesn't support Guile integration. Use build_w32.bat
if you want to build with Guile support.
Running the test suite
@ -110,7 +132,11 @@ Running the test suite
3. You will need an installation of Perl. Be sure to use a relatively
modern version: older versions will sometimes throw spurious errors.
To run the suite after building, use:
To run the suite after building using GNU make, use:
make -f Basic.mk check
Alternatively if you'd like to run tests by hand, use:
cd tests
.\run_make_tests.bat -make <path-to-make>

View file

@ -1,217 +0,0 @@
# -*-Makefile-*- for building GNU make with smake
#
# NOTE: If you have no 'make' program at all to process this makefile,
# run 'build.sh' instead.
#
# Copyright (C) 1995-2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
#
# Makefile for GNU Make
#
# Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = /make-%VERSION%/
# This must repeat the value, because configure will remove 'VPATH = .'.
srcdir = /make-%VERSION%/
CC = sc
RM = delete
MAKE = smake
CFLAGS =
CPPFLAGS =
LDFLAGS =
# Define these for your system as follows:
# -DNO_ARCHIVES To disable 'ar' archive support.
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
# Some compilers apparently accept this
# without complaint but produce losing code,
# so beware.
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
# See also 'config.h'.
defines =
# Which flavor of remote job execution support to use.
# The code is found in 'remote-$(REMOTE).c'.
REMOTE = stub
# If you are using the GNU C library, or have the GNU getopt functions in
# your C library, you can comment these out.
GETOPT = getopt.o getopt1.o
GETOPT_SRC = $(srcdir)getopt.c $(srcdir)getopt1.c $(srcdir)getopt.h
# If you are using the GNU C library, or have the GNU glob functions in
# your C library, you can comment this out. GNU make uses special hooks
# into the glob functions to be more efficient (by using make's directory
# cache for globbing), so you must use the GNU functions even if your
# system's C library has the 1003.2 glob functions already. Also, the glob
# functions in the AIX and HPUX C libraries are said to be buggy.
GLOB = Lib glob/glob.lib
# If your system doesn't have alloca, or the one provided is bad, define this.
ALLOCA = alloca.o
ALLOCA_SRC = $(srcdir)alloca.c
# If your system needs extra libraries loaded in, define them here.
# System V probably need -lPW for alloca. HP-UX 7.0's alloca in
# libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
# alloca.c instead on those machines.
LOADLIBES =
# Any extra object files your system needs.
extras = amiga.o
# Common prefix for machine-independent installed files.
prefix =
# Common prefix for machine-dependent installed files.
exec_prefix =
# Directory to install 'make' in.
bindir = sc:c
# Directory to find libraries in for '-lXXX'.
libdir = lib:
# Directory to search by default for included makefiles.
includedir = include:
# Directory to install the Info files in.
infodir = doc:
# Directory to install the man page in.
mandir = t:
# Number to put on the man page filename.
manext = 1
# Prefix to put on installed 'make' binary file name.
binprefix =
# Prefix to put on installed 'make' man page file name.
manprefix = $(binprefix)
# Whether or not make needs to be installed setgid.
# The value should be either 'true' or 'false'.
# On many systems, the getloadavg function (used to implement the '-l'
# switch) will not work unless make is installed setgid kmem.
install_setgid = false
# Install make setgid to this group so it can read /dev/kmem.
group = sys
# Program to install 'make'.
INSTALL_PROGRAM = copy
# Program to install the man page.
INSTALL_DATA = copy
# Generic install program.
INSTALL = copy
# Program to format Texinfo source into Info files.
MAKEINFO = makeinfo
# Program to format Texinfo source into DVI files.
TEXI2DVI = texi2dvi
# Programs to make tags files.
ETAGS = etags -w
CTAGS = ctags -w
#guile = guile.o
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
rule.o implicit.o default.o variable.o expand.o function.o \
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) \
$(extras) $(guile)
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
$(srcdir)output.c $(srcdir)output.h \
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
.SUFFIXES:
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo
all: make
info: make.info
dvi: make.dvi
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
.PHONY: all check info dvi
make.info: make.texinfo
$(MAKEINFO) -I$(srcdir) $(srcdir)make.texinfo -o make.info
make.dvi: make.texinfo
$(TEXI2DVI) $(srcdir)make.texinfo
make.ps: make.dvi
dvi2ps make.dvi > make.ps
make: $(objs) glob/glob.lib
$(CC) Link $(LDFLAGS) $(objs) $(LOADLIBES) To make.new
-delete quiet make
rename make.new make
# -I. is needed to find config.h in the build directory.
.c.o:
$(CC) $(defines) IDir "" IDir $(srcdir)glob \
$(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
glob/glob.lib:
execute <<
cd glob
smake
<
tagsrcs = $(srcs) $(srcdir)remote-*.c
TAGS: $(tagsrcs)
$(ETAGS) $(tagsrcs)
tags: $(tagsrcs)
$(CTAGS) $(tagsrcs)
.PHONY: install installdirs
install:
copy make sc:c
loadavg: loadavg.c config.h
$(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
loadavg.c $(LOADLIBES) -o $@
clean: glob-clean
-$(RM) -f make loadavg *.o core make.dvi
distclean: clean glob-realclean
-$(RM) -f Makefile config.h config.status build.sh
-$(RM) -f config.log config.cache
-$(RM) -f TAGS tags
-$(RM) -f make.?? make.??s make.log make.toc make.*aux
-$(RM) -f loadavg.c
realclean: distclean
-$(RM) -f make.info*
mostlyclean: clean
.PHONY: glob-clean glob-realclean
glob-clean glob-realclean:
execute <<
cd glob
smake $@
<

View file

@ -190,12 +190,12 @@ call :Compile strcache
call :Compile variable
call :Compile version
call :Compile vpath
call :Compile w32\compat\posixfcn
call :Compile w32\pathstuff
call :Compile w32\w32os
call :Compile w32\compat\posixfcn
call :Compile w32\subproc\misc
call :Compile w32\subproc\sub_proc
call :Compile w32\subproc\w32err
call :Compile w32\w32os
if not "%COMPILER%" == "gcc" call :Compile w32\compat\dirent
@ -204,6 +204,7 @@ call :Link
echo.
if not exist %OUTDIR%\%MAKE%.exe echo %OUTDIR% build FAILED!
if exist %OUTDIR%\%MAKE%.exe echo %OUTDIR% build succeeded.
if exist %OUTDIR%\%MAKE%.exe copy /Y Basic.mk Makefile
goto :EOF
:Compile

89
builddos.bat Normal file
View file

@ -0,0 +1,89 @@
@echo off
rem Copyright (C) 1998-2017 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 3 of the License, or (at your option)
rem any later version.
rem
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
rem more details.
rem
rem You should have received a copy of the GNU General Public License along
rem with this program. If not, see <http://www.gnu.org/licenses/>.
echo Building Make for MSDOS with DJGPP
rem The SmallEnv trick protects against too small environment block,
rem in which case the values will be truncated and the whole thing
rem goes awry. COMMAND.COM will say "Out of environment space", but
rem many people don't care, so we force them to care by refusing to go.
rem Where is the srcdir?
set XSRC=.
if not "%XSRC%"=="." goto SmallEnv
if "%1%"=="" goto SrcDone
set XSRC=%1
if not "%XSRC%"=="%1" goto SmallEnv
:SrcDone
copy /Y %XSRC%/configh.dos ./config.h
if not exist glob mkdir glob
rem Echo ON so they will see what is going on.
@echo on
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/commands.c -o commands.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/output.c -o output.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/job.c -o job.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/dir.c -o dir.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/file.c -o file.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/misc.c -o misc.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/main.c -o main.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g %XSRC%/read.c -o read.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g %XSRC%/remake.c -o remake.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/rule.c -o rule.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/implicit.c -o implicit.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/default.c -o default.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/variable.c -o variable.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/expand.c -o expand.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/function.c -o function.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/vpath.c -o vpath.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/hash.c -o hash.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/strcache.c -o strcache.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/version.c -o version.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/ar.c -o ar.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/arscan.c -o arscan.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/signame.c -o signame.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/remote-stub.c -o remote-stub.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/getopt.c -o getopt.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/getopt1.c -o getopt1.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/glob/glob.c -o glob/glob.o
gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/glob/fnmatch.c -o glob/fnmatch.o
@echo off
echo commands.o > respf.$$$
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
for %%f in (glob/glob glob/fnmatch) do echo %%f.o >> respf.$$$
rem gcc -c -I%XSRC% -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/guile.c -o guile.o
rem echo guile.o >> respf.$$$
@echo Linking...
@echo on
gcc -o make.exe @respf.$$$
@echo off
if not exist make.exe echo Make.exe build failed...
if exist make.exe echo make.exe is now built!
if exist make.exe del respf.$$$
if exist make.exe copy /Y Basic.mk Makefile
goto End
:SmallEnv
echo Your environment is too small. Please enlarge it and run me again.
:End
set XRSC=
@echo on

View file

@ -27,8 +27,6 @@ AC_CONFIG_HEADERS([config.h])
# Automake setup
# We have to enable "foreign" because ChangeLog is auto-generated
# We cannot enable -Werror because gettext 0.18.1 has invalid content
# When we update gettext to 0.18.3 or better we can add it again.
AM_INIT_AUTOMAKE([1.15 foreign -Werror -Wall])
# Checks for programs.
@ -41,9 +39,6 @@ AC_CHECK_PROG([AR], [ar], [ar], [ar])
# Perl is needed for the test suite (only)
AC_CHECK_PROG([PERL], [perl], [perl], [perl])
# Needed for w32/Makefile.am
AM_PROG_AR
# Specialized system macros
AC_CANONICAL_HOST
AC_AIX
@ -509,7 +504,7 @@ AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes],
# Specify what files are to be created.
AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \
doc/Makefile w32/Makefile tests/config-flags.pm])
doc/Makefile tests/config-flags.pm])
# OK, do it!

View file

@ -1,60 +0,0 @@
@echo off
rem Copyright (C) 1994-2017 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 3 of the License, or (at your option)
rem any later version.
rem
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
rem more details.
rem
rem You should have received a copy of the GNU General Public License along
rem with this program. If not, see <http://www.gnu.org/licenses/>.
echo Configuring MAKE for DJGPP
rem The SmallEnv trick protects against too small environment block,
rem in which case the values will be truncated and the whole thing
rem goes awry. COMMAND.COM will say "Out of environment space", but
rem many people don't care, so we force them to care by refusing to go.
rem Where is the srcdir?
set XSRC=.
if not "%XSRC%"=="." goto SmallEnv
if "%1%"=="" goto SrcDone
set XSRC=%1
if not "%XSRC%"=="%1" goto SmallEnv
:SrcDone
update %XSRC%/configh.dos ./config.h
rem Do they have Make?
redir -o junk.$$$ -eo make -n -f NUL
rem REDIR will return 1 if it cannot run Make.
rem If it can run Make, it will usually return 2,
rem but 0 is also OK with us.
if errorlevel 2 goto MakeOk
if not errorlevel 1 goto MakeOk
if exist junk.$$$ del junk.$$$
echo No Make program found--use DOSBUILD.BAT to build Make.
goto End
rem They do have Make. Generate the Makefile.
:MakeOk
del junk.$$$
update %XSRC%/Makefile.DOS ./Makefile
echo Done.
if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
goto End
:SmallEnv
echo Your environment is too small. Please enlarge it and run me again.
:End
set XRSC=

View file

@ -1,65 +0,0 @@
@echo off
rem Copyright (C) 1998-2017 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 3 of the License, or (at your option)
rem any later version.
rem
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
rem more details.
rem
rem You should have received a copy of the GNU General Public License along
rem with this program. If not, see <http://www.gnu.org/licenses/>.
echo Building Make for MSDOS
rem Echo ON so they will see what is going on.
@echo on
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g output.c -o output.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g misc.c -o misc.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g read.c -o read.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g remake.c -o remake.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g hash.c -o hash.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g strcache.c -o strcache.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g signame.c -o signame.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g remote-stub.c -o remote-stub.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt.c -o getopt.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt1.c -o getopt1.o
@cd glob
@if exist libglob.a del libglob.a
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g glob.c -o glob.o
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g fnmatch.c -o fnmatch.o
ar rv libglob.a glob.o fnmatch.o
@echo off
cd ..
echo commands.o > respf.$$$
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
echo glob/libglob.a >> respf.$$$
rem gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g guile.c -o guile.o
rem echo guile.o >> respf.$$$
@echo Linking...
@echo on
gcc -o make.new @respf.$$$
@if exist make.exe echo Make.exe is now built!
@if not exist make.exe echo Make.exe build failed...
@if exist make.exe del respf.$$$

View file

@ -26,5 +26,4 @@ endif
libglob_a_SOURCES = glob.c glob.h fnmatch.c fnmatch.h
EXTRA_DIST = COPYING.LIB Makefile.ami SCOPTIONS SMakefile \
configure.bat
EXTRA_DIST = COPYING.LIB

View file

@ -1,12 +0,0 @@
ERRORREXX
OPTIMIZE
NOVERSION
OPTIMIZERTIME
OPTIMIZERALIAS
DEFINE INCLUDEDIR="include:"
DEFINE LIBDIR="lib:"
DEFINE NO_ALLOCA
DEFINE NO_ARCHIVES
IGNORE=161
IGNORE=100
STARTUP=cres

View file

@ -1,67 +0,0 @@
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
# Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = /glob/
# This must repeat the value, because configure will remove `VPATH = .'.
srcdir = /glob/
CC = sc
CPPFLAGS =
CFLAGS =
MAKE = smake
RM = delete
# Information determined by configure.
DEFS = Define HAVE_HEADER_STDC Define HAVE_UNISTD_H Define HAVE_STRING_H \
Define HAVE_DIRENT_H
# How to invoke ar.
AR = join
ARFLAGS = as
# How to invoke ranlib.
RANLIB = ;
.PHONY: all
all: glob.lib
glob.lib : glob.o fnmatch.o
$(AR) $(ARFLAGS) $@ glob.o fnmatch.o
$(RANLIB) $@
# For some reason, Unix make wants the dependencies on the source files.
# Otherwise it refuses to use an implicit rule!
# And, get this: it doesn't work to use $(srcdir)foo.c!!
glob.o: $(srcdir)glob.h $(srcdir)fnmatch.h glob.c
fnmatch.o: $(srcdir)fnmatch.h fnmatch.c
.c.o:
$(CC) IDir "" \
$(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
.PHONY: clean realclean glob-clean glob-realclean distclean
clean glob-clean:
-$(RM) -f glob.lib *.o core
distclean glob-realclean: clean
-$(RM) -f TAGS tags Makefile config.status config.h config.log
realcean: distclean
# For inside the C library.
glob.tar glob.tar.Z:
$(MAKE) -C .. $@

View file

@ -1,43 +0,0 @@
@echo off
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
rem 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 3 of the License, or (at your option)
rem any later version.
rem
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
rem more details.
rem
rem You should have received a copy of the GNU General Public License along
rem with this program. If not, see <http://www.gnu.org/licenses/>.
echo Configuring glob for DJGPP
rem This batch file assumes a unix-type "sed" program
echo # Makefile generated by "configure.bat"> Makefile
if exist config.sed del config.sed
echo "s/@srcdir@/./ ">> config.sed
echo "s/@CC@/gcc/ ">> config.sed
echo "s/@CFLAGS@/-O2 -g/ ">> config.sed
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -I../ ">> config.sed
echo "s/@AR@/ar/ ">> config.sed
echo "s/@RANLIB@/ranlib/ ">> config.sed
echo "s/@LDFLAGS@// ">> config.sed
echo "s/@DEFS@// ">> config.sed
echo "s/@ALLOCA@// ">> config.sed
echo "s/@LIBS@// ">> config.sed
echo "s/@LIBOBJS@// ">> config.sed
echo "s/^Makefile *:/_Makefile:/ ">> config.sed
echo "s/^config.h *:/_config.h:/ ">> config.sed
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
sed -f config2.sed Makefile.in >> Makefile
del config.sed
del config2.sed

View file

@ -35,16 +35,8 @@ AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
# I want this one but I have to wait for the const cleanup!
# -Wwrite-strings
# Find the glob source files... this might be dangerous, but we're maintainers!
globsrc := $(wildcard glob/*.c)
globhdr := $(wildcard glob/*.h)
TEMPLATES = README README.DOS README.W32 README.OS2 \
config.ami configh.dos config.h.W32 config.h-vms
MTEMPLATES = Makefile.DOS SMakefile
# These are built as a side-effect of the dist rule
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
# Create preprocessor output files--GCC specific!
%.i : %.c
@ -61,24 +53,20 @@ $(TEMPLATES) : % : %.template Makefile
# Construct Makefiles by adding on dependencies, etc.
#
$(MTEMPLATES) : % : %.template .dep_segment Makefile
Basic.mk: Basic.mk.template .dep_segment Makefile
rm -f $@
sed -e 's@%VERSION%@$(VERSION)@g' \
-e 's@%PROGRAMS%@$(bin_PROGRAMS)@g' \
-e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@g' \
-e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@g' \
-e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@g' \
-e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@g' \
-e 's@%make_SOURCES%@$(filter %.c,$(make_SRCS))@g' \
-e 's@%glob_SOURCES%@$(filter %.c,$(glob_SRCS))@g' \
-e 's@%w32_SOURCES%@$(filter %.c,$(w32_SRCS))@g' \
-e 's@%vms_SOURCES%@$(filter %.c,$(vms_SRCS))@g' \
-e 's@%amiga_SOURCES%@$(filter %.c,$(amiga_SRCS))@g' \
$< > $@
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
cat $(word 2,$^) >>$@
chmod a-w $@
NMakefile: NMakefile.template .dep_segment Makefile
rm -f $@
cp $< $@
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)/\1.$$(OBJEXT):@' \
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
-e 's@$$(SRCDIR)/config.h@$$(OUTDIR)/config.h@g' \
$(word 2,$^) >>$@
chmod a-w $@
# Construct build.sh.in
@ -86,15 +74,14 @@ NMakefile: NMakefile.template .dep_segment Makefile
build.sh.in: build.template Makefile
rm -f $@
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(filter %.c,$(glob_SRCS)))@g' \
$< > $@
chmod a-w+x $@
# Use automake to build a dependency list file, for "foreign" makefiles like
# Makefile.DOS.
# Use automake to build a dependency list file, for Makebase.mk.
#
# Automake used to have a --generate-deps flag, but it's gone now, so we have
# Automake used to have a --generate-deps flag but it's gone now, so we have
# to do it ourselves.
#
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)

View file

@ -1,5 +0,0 @@
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"+"output.o"
TO "make.new"
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
QUIET

View file

@ -1,21 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_msvc.net2003", "make_msvc_net2003.vcproj", "{E96B5060-3240-4723-91C9-E64F1C877A04}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.ActiveCfg = Debug|Win32
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.Build.0 = Debug|Win32
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.ActiveCfg = Release|Win32
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View file

@ -1,340 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="make_msvc.net2003"
ProjectGUID="{E96B5060-3240-4723-91C9-E64F1C877A04}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;w32/include;glob"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0"
WarningLevel="4"
SuppressStartupBanner="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/make_msvc.net2003.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/make_msvc.net2003.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Copying config.h.W32 to config.h"
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;w32/include;glob"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
RuntimeLibrary="0"
ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/make_msvc.net2003.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Copying config.h.W32 to config.h"
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\ar.c">
</File>
<File
RelativePath=".\arscan.c">
</File>
<File
RelativePath=".\commands.c">
</File>
<File
RelativePath=".\default.c">
</File>
<File
RelativePath=".\dir.c">
</File>
<File
RelativePath=".\expand.c">
</File>
<File
RelativePath=".\file.c">
</File>
<File
RelativePath=".\function.c">
</File>
<File
RelativePath=".\getloadavg.c">
</File>
<File
RelativePath=".\getopt.c">
</File>
<File
RelativePath=".\getopt1.c">
</File>
<File
RelativePath=".\guile.c">
</File>
<File
RelativePath=".\hash.c">
</File>
<File
RelativePath=".\strcache.c">
</File>
<File
RelativePath=".\implicit.c">
</File>
<File
RelativePath=".\job.c">
</File>
<File
RelativePath=".\load.c">
</File>
<File
RelativePath=".\output.c">
</File>
<File
RelativePath=".\main.c">
</File>
<File
RelativePath=".\misc.c">
</File>
<File
RelativePath=".\read.c">
</File>
<File
RelativePath=".\remake.c">
</File>
<File
RelativePath=".\remote-stub.c">
</File>
<File
RelativePath=".\rule.c">
</File>
<File
RelativePath=".\signame.c">
</File>
<File
RelativePath=".\variable.c">
</File>
<File
RelativePath=".\version.c">
</File>
<File
RelativePath=".\vpath.c">
</File>
<Filter
Name="w32"
Filter="">
<File
RelativePath=".\w32\compat\dirent.c">
</File>
<File
RelativePath=".\w32\compat\posixfcn.c">
</File>
<File
RelativePath=".\w32\subproc\misc.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
RelativePath=".\w32\pathstuff.c">
</File>
<File
RelativePath=".\w32\w32os.c">
</File>
<File
RelativePath=".\w32\subproc\sub_proc.c">
</File>
<File
RelativePath=".\w32\subproc\w32err.c">
</File>
</Filter>
<Filter
Name="glob"
Filter="">
<File
RelativePath=".\glob\fnmatch.c">
</File>
<File
RelativePath=".\glob\glob.c">
</File>
</Filter>
</Filter>
<Filter
Name="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\commands.h">
</File>
<File
RelativePath=".\config.h">
</File>
<File
RelativePath=".\debug.h">
</File>
<File
RelativePath=".\dep.h">
</File>
<File
RelativePath=".\filedef.h">
</File>
<File
RelativePath=".\getopt.h">
</File>
<File
RelativePath=".\gettext.h">
</File>
<File
RelativePath=".\gmk-default.h">
</File>
<File
RelativePath=".\hash.h">
</File>
<File
RelativePath=".\job.h">
</File>
<File
RelativePath=".\output.h">
</File>
<File
RelativePath=".\makeint.h">
</File>
<File
RelativePath=".\rule.h">
</File>
<File
RelativePath=".\variable.h">
</File>
<File
RelativePath=".\vmsdir.h">
</File>
<Filter
Name="w32"
Filter="">
<File
RelativePath=".\w32\include\dirent.h">
</File>
<File
RelativePath=".\w32\include\pathstuff.h">
</File>
<File
RelativePath=".\w32\subproc\proc.h">
</File>
<File
RelativePath=".\w32\include\sub_proc.h">
</File>
<File
RelativePath=".\w32\include\w32err.h">
</File>
</Filter>
<Filter
Name="glob"
Filter="">
<File
RelativePath=".\glob\fnmatch.h">
</File>
<File
RelativePath=".\glob\glob.h">
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -1,5 +1,8 @@
# Makefile.am to create libw32.a for mingw32 host.
# Copyright (C) 1997-2017 Free Software Foundation, Inc.
# GNU -*-Makefile-*- to build GNU make on Amiga
#
# Amiga overrides for use with Basic.mk.
#
# Copyright (C) 2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
@ -15,12 +18,24 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
AUTOMAKE_OPTIONS = subdir-objects
CC = sc
LD = $(CC) Link
RM = delete
MKDIR = makedir
noinst_LIBRARIES = libw32.a
CPPFLAGS =
CFLAGS =
LDFLAGS =
libw32_a_SOURCES = subproc/misc.c subproc/sub_proc.c subproc/w32err.c \
compat/posixfcn.c pathstuff.c w32os.c
prog_SOURCES += alloca.c getloadavg.c $(glob_SOURCES) $(amiga_SOURCES)
libw32_a_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/subproc -I$(top_srcdir) \
-I$(top_srcdir)/glob
extra_CPPFLAGS = IDir "" IDir $(SRCDIR)/glob
C_SOURCE =
OUTPUT_OPTION =
LDFLAGS = From LIB:cres.o
LDLIBS = Lib LIB:sc.lib LIB:amiga.lib
LINK_OUTPUT = To $@
$(OUTDIR)/config.h: $(SRCDIR)/config.ami
copy $< To $@

116
mk/Windows32.mk Normal file
View file

@ -0,0 +1,116 @@
# GNU -*-Makefile-*- to build GNU make on Windows
#
# Windows overrides for use with Makebase.mk.
#
# Copyright (C) 2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
# TARGET_TYPE can be either "release" or "debug"
TARGET_TYPE = release
# TOOLCHAIN can be either "msvc" or "gcc"
TOOLCHAIN = msvc
prog_SOURCES += getloadavg.c $(glob_SOURCES) $(w32_SOURCES)
w32_LIBS = kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 \
oleaut32 uuid odbc32 odbccp32
CPPFLAGS =
CFLAGS =
LDFLAGS =
# --- Visual Studio
msvc_CC = cl.exe
msvc_LD = link.exe
msvc_CPPFLAGS = /DHAVE_CONFIG_H /DWINDOWS32 /DWIN32 /D_CONSOLE
msvc_CPPFLAGS += /I$(OUTDIR) /I$(SRCDIR) /I$(SRCDIR)/glob /I$(SRCDIR)/w32/include
msvc_CFLAGS = /nologo /MT /W4 /EHsc
msvc_CFLAGS += /FR$(OUTDIR) /Fp$(BASE_PROG).pch /Fd$(BASE_PROG).pdb
msvc_LDFLAGS = /nologo /SUBSYSTEM:console /PDB:$(BASE_PROG).pdb
msvc_LDLIBS = $(addsuffix .lib,$(w32_LIBS))
msvc_C_SOURCE = /c
msvc_OUTPUT_OPTION = /Fo$@
msvc_LINK_OUTPUT = /OUT:$@
release_msvc_OUTDIR = ./WinRel
release_msvc_CPPFLAGS = /D NDEBUG
release_msvc_CFLAGS = /O2
debug_msvc_OUTDIR = ./WinDebug
debug_msvc_CPPFLAGS = /D _DEBUG
debug_msvc_CFLAGS = /Zi /Od
debug_msvc_LDFLAGS = /DEBUG
# --- GCC
gcc_CC = gcc
gcc_LD = $(gcc_CC)
release_gcc_OUTDIR = ./GccRel
debug_gcc_OUTDIR = ./GccDebug
gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OBJDIR) -I$(SRCDIR) -I$(SRCDIR)/glob -I$(SRCDIR)/w32/include
gcc_CFLAGS = -mthreads -Wall -std=gnu99 -gdwarf-2 -g3
gcc_LDFLAGS = -mthreads -gdwarf-2 -g3
gcc_LDLIBS = $(addprefix -l,$(w32_libs))
gcc_C_SOURCE = -c
gcc_OUTPUT_OPTION = -o $@
gcc_LINK_OUTPUT = -o $@
debug_gcc_CFLAGS = -O0
release_gcc_CFLAGS = -O2
# ---
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) $(LINK_OUTPUT)
CHECK.cmd = cmd /c cd tests \& .\run_make_tests.bat -make ../$(PROG)
MKDIR.cmd = cmd /c mkdir $(subst /,\\,$@)
RM.cmd = cmd /c del /F /Q $(subst /,\\,$(OBJECTS) $(PROG))
CC = $($(TOOLCHAIN)_CC)
LD = $($(TOOLCHAIN)_LD)
C_SOURCE = $($(TOOLCHAIN)_C_SOURCE)
OUTPUT_OPTION = $($(TOOLCHAIN)_OUTPUT_OPTION)
LINK_OUTPUT = $($(TOOLCHAIN)_LINK_OUTPUT)
OUTDIR = $($(TARGET_TYPE)_$(TOOLCHAIN)_OUTDIR)
OBJEXT = obj
EXEEXT = .exe
_CUSTOM = $($(TOOLCHAIN)_$1) $($(TARGET_TYPE)_$1) $($(TARGET_TYPE)_$(TOOLCHAIN)_$1)
# I'm not sure why this builds gnumake rather than make...?
PROG = $(OUTDIR)/gnumake$(EXEEXT)
BASE_PROG = $(basename $(PROG))
extra_CPPFLAGS = $(call _CUSTOM,CPPFLAGS)
extra_CFLAGS = $(call _CUSTOM,CFLAGS)
extra_LDFLAGS = $(call _CUSTOM,LDFLAGS)
LDLIBS = $(call _CUSTOM,LDLIBS)
$(OUTDIR)/config.h: $(SRCDIR)/config.h.W32
cmd /c copy /Y $(subst /,\\,$< $@)

34
mk/msdosdjgpp.mk Normal file
View file

@ -0,0 +1,34 @@
# GNU -*-Makefile-*- to build GNU make on MS-DOS with DJGPP
#
# MS-DOS overrides for use with Makebase.mk.
#
# Copyright (C) 2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
OBJEXT = o
EXEEXT = .exe
CC = gcc
prog_SOURCES += getloadavg.c $(glob_SOURCES)
extra_CPPFLAGS += -I$(SRCDIR)/glob -DINCLUDEDIR=\"c:/djgpp/include\" -DLIBDIR=\"c:/djgpp/lib\"
MKDIR.cmd = command.com /c mkdir $(subst /,\\,$@)
RM.cmd = command.com /c del /F /Q $(subst /,\\,$(OBJECTS) $(PROG))
$(OUTDIR)/config.h: $(SRCDIR)/configh.dos
command.com /c copy /Y $(subst /,\\,$< $@)

View file

@ -1,24 +0,0 @@
@echo off
rem Copyright (C) 1996-2017 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 3 of the License, or (at your option)
rem any later version.
rem
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
rem more details.
rem
rem You should have received a copy of the GNU General Public License along
rem with this program. If not, see <http://www.gnu.org/licenses/>.
cd w32\subproc
set MAKE=%2
set MAKEFILE=%1
if x%2 == x set MAKE=nmake
%MAKE% /f %MAKEFILE%
if ERRORLEVEL 1 exit /B
cd ..\..

View file

@ -71,7 +71,10 @@ use FindBin;
use lib "$FindBin::Bin";
require "test_driver.pl";
require "config-flags.pm";
if (! eval { require "config-flags.pm" }) {
# Some target systems don't create config-flags.pm
%CONFIG_FLAGS = ();
}
# Some target systems might not have the POSIX module...
$has_POSIX = eval { require "POSIX.pm" };

View file

@ -6,6 +6,12 @@ $details = "Test dynamic loading of modules.";
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
if (! exists $CONFIG_FLAGS{CC}) {
$verbose and print "Skipping load test: no CC defined\n";
return -1;
}
# First build a shared object
# Provide both a default and non-default load symbol
@ -39,7 +45,6 @@ EOF
close($F) or die "close: testload.c: $!\n";
# Make sure we can compile
# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testload.so testload.c";

View file

@ -6,6 +6,12 @@ $details = "Verify the different aspects of the shared object API.";
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
if (! exists $CONFIG_FLAGS{CC}) {
$verbose and print "Skipping load test: no CC defined\n";
return -1;
}
# First build a shared object
# Provide both a default and non-default load symbol
@ -72,6 +78,8 @@ testapi_gmk_setup ()
EOF
close($F) or die "close: testapi.c: $!\n";
# Make sure we can compile
my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testapi.so testapi.c";
my $clog = `$sobuild 2>&1`;

View file

@ -1,60 +0,0 @@
# NOTE: If you have no 'make' program at all to process this makefile, run
# 'build.bat' instead.
#
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
#
# NMakefile for GNU Make (subproc library)
#
LIB = lib
CC = cl
MAKE = nmake
OUTDIR=.
MAKEFILE=NMakefile
CFLAGS_any = /nologo /MT /W4 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS -I. -I../include -I../../
CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/
CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/
all: Release Debug
Release:
$(MAKE) /f $(MAKEFILE) OUTDIR=WinRel CFLAGS="$(CFLAGS_release)" WinRel/subproc.lib
Debug:
$(MAKE) /f $(MAKEFILE) OUTDIR=WinDebug CFLAGS="$(CFLAGS_debug)" WinDebug/subproc.lib
clean:
rmdir /s /q WinRel WinDebug
erase *.pdb
$(OUTDIR):
if not exist .\$@\nul mkdir .\$@
OBJS = $(OUTDIR)/misc.obj $(OUTDIR)/w32err.obj $(OUTDIR)/sub_proc.obj
$(OUTDIR)/subproc.lib: $(OUTDIR) $(OBJS)
$(LIB) -out:$@ @<<
$(OBJS)
<<
.c{$(OUTDIR)}.obj:
$(CC) $(CFLAGS) /c $<
$(OUTDIR)/misc.obj: misc.c proc.h
$(OUTDIR)/sub_proc.obj: sub_proc.c ../include/sub_proc.h ../include/w32err.h proc.h
$(OUTDIR)/w32err.obj: w32err.c ../include/w32err.h