mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-25 05:29:46 +00:00
Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory. Update all scripting and recommendations to support this change. * *.c, *.h, w32/*: Move to src/ * configure.ac, Makefile.am, maintMakefile: Locate new source files. * Basic.mk.template, mk/*: Update for new source file locations. * NEWS, README.DOS.template: Update for new locations. * build.template, build_w32.bat, builddos.bat: Ditto. * po/POTFILES.in: Ditto * tests/run_make_tests.pl, tests/scripts/features/load*: Ditto. * make.1: Move to doc. * mk/VMS.mk: Add support for building on VMS (hopefully). * makefile.vms, prepare_w32.bat: Remove. * SCOPTIONS: Update to define HAVE_CONFIG_H
This commit is contained in:
parent
1af314465e
commit
fb779d2f1e
97 changed files with 433 additions and 402 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -22,6 +22,8 @@ config.log
|
||||||
config.status
|
config.status
|
||||||
configure
|
configure
|
||||||
stamp-h1
|
stamp-h1
|
||||||
|
.dirstamp
|
||||||
|
mk/Posix.mk
|
||||||
|
|
||||||
# Build artifacts
|
# Build artifacts
|
||||||
.deps
|
.deps
|
||||||
|
|
|
@ -28,20 +28,40 @@
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
make_SOURCES = %make_SOURCES% remote-stub.c
|
src = src/
|
||||||
|
glob = glob/
|
||||||
|
|
||||||
|
make_SOURCES = %make_SOURCES%
|
||||||
glob_SOURCES = %glob_SOURCES%
|
glob_SOURCES = %glob_SOURCES%
|
||||||
|
loadavg_SOURCES = %loadavg_SOURCES%
|
||||||
|
alloca_SOURCES = %alloca_SOURCES%
|
||||||
w32_SOURCES = %w32_SOURCES%
|
w32_SOURCES = %w32_SOURCES%
|
||||||
vms_SOURCES = %vms_SOURCES%
|
vms_SOURCES = %vms_SOURCES%
|
||||||
amiga_SOURCES = %amiga_SOURCES%
|
amiga_SOURCES = %amiga_SOURCES%
|
||||||
|
|
||||||
OUTDIR = .
|
posix_SOURCES = $(src)posixos.c
|
||||||
|
remote_SOURCES = $(src)remote-stub.c
|
||||||
|
|
||||||
|
OUTDIR =
|
||||||
SRCDIR = .
|
SRCDIR = .
|
||||||
|
|
||||||
OBJEXT = o
|
OBJEXT = o
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
PROG = $(OUTDIR)/make$(EXEEXT)
|
PREFIX = /usr/local
|
||||||
|
INCLUDEDIR = $(PREFIX)/include
|
||||||
|
LIBDIR = $(PREFIX)/lib
|
||||||
|
LOCALEDIR = $(PREFIX)/share
|
||||||
|
|
||||||
|
PROG = $(OUTDIR)make$(EXEEXT)
|
||||||
|
|
||||||
|
prog_SOURCES = $(make_SOURCES) $(remote_SOURCES)
|
||||||
|
|
||||||
|
OBJECTS = $(patsubst %.c,$(OUTDIR)%.$(OBJEXT),$(prog_SOURCES))
|
||||||
|
|
||||||
|
OBJDIRS = $(addsuffix .,$(sort $(dir $(OBJECTS))))
|
||||||
|
|
||||||
|
# Use the default value of CC
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
|
|
||||||
# Reserved for command-line override
|
# Reserved for command-line override
|
||||||
|
@ -49,9 +69,8 @@ CPPFLAGS =
|
||||||
CFLAGS = -g -O2
|
CFLAGS = -g -O2
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
prog_SOURCES = $(make_SOURCES)
|
extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src \
|
||||||
|
-DLIBDIR=\"$(LIBDIR)\" -DINCLUDEDIR=\"$(INCLUDEDIR)\" -DLOCALEDIR=\"$(LOCALDIR)\"
|
||||||
extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR) -I$(SRCDIR)
|
|
||||||
extra_CFLAGS =
|
extra_CFLAGS =
|
||||||
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)
|
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
@ -65,7 +84,10 @@ COMPILE.cmd = $(CC) $(extra_CFLAGS) $(CFLAGS) $(extra_CPPFLAGS) $(CPPFLAGS) $(TA
|
||||||
|
|
||||||
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) $(LINK_OUTPUT)
|
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) $(LINK_OUTPUT)
|
||||||
|
|
||||||
CHECK.cmd = cd tests && ./run_make_tests -make $(shell cd $(<D) && pwd)/$(<F)
|
CHECK.cmd = cd $(SRCDIR)/tests && ./run_make_tests -make $(shell cd $(<D) && pwd)/$(<F)
|
||||||
|
|
||||||
|
CP = cp
|
||||||
|
CP.cmd = $(CP) $< $@
|
||||||
|
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
MKDIR.cmd = $(MKDIR) $@
|
MKDIR.cmd = $(MKDIR) $@
|
||||||
|
@ -74,7 +96,7 @@ RM = rm -f
|
||||||
RM.cmd = $(RM) $(OBJECTS) $(PROG)
|
RM.cmd = $(RM) $(OBJECTS) $(PROG)
|
||||||
|
|
||||||
# Load overrides for the above variables.
|
# Load overrides for the above variables.
|
||||||
include $(wildcard mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk))
|
include $(firstword $(wildcard $(SRCDIR)/mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk) $(OUTDIR)mk/Posix.mk $(SRCDIR)/mk/Posix.mk))
|
||||||
|
|
||||||
VERSION = %VERSION%
|
VERSION = %VERSION%
|
||||||
|
|
||||||
|
@ -82,16 +104,15 @@ VPATH = $(SRCDIR)
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
|
||||||
OBJECTS = $(patsubst %.c,$(OUTDIR)/%.$(OBJEXT),$(prog_SOURCES))
|
|
||||||
|
|
||||||
$(PROG): $(OBJECTS)
|
$(PROG): $(OBJECTS)
|
||||||
$(LINK.cmd)
|
$(LINK.cmd)
|
||||||
|
|
||||||
.SECONDEXPANSION:
|
$(OBJECTS): $(OUTDIR)%.$(OBJEXT): %.c
|
||||||
$(OBJECTS): $(OUTDIR)/%.$(OBJEXT): %.c | $$(@D)/.
|
|
||||||
$(COMPILE.cmd)
|
$(COMPILE.cmd)
|
||||||
|
|
||||||
$(addsuffix .,$(sort $(dir $(OBJECTS)))):
|
$(OBJECTS): | $(OBJDIRS)
|
||||||
|
|
||||||
|
$(OBJDIRS):
|
||||||
$(MKDIR.cmd)
|
$(MKDIR.cmd)
|
||||||
|
|
||||||
check: $(PROG)
|
check: $(PROG)
|
||||||
|
|
82
Makefile.am
82
Makefile.am
|
@ -16,7 +16,7 @@
|
||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options subdir-objects
|
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options subdir-objects nostdinc
|
||||||
ACLOCAL_AMFLAGS = -I config
|
ACLOCAL_AMFLAGS = -I config
|
||||||
|
|
||||||
MAKE_HOST = @MAKE_HOST@
|
MAKE_HOST = @MAKE_HOST@
|
||||||
|
@ -24,29 +24,37 @@ MAKE_HOST = @MAKE_HOST@
|
||||||
SUBDIRS = glob config po doc
|
SUBDIRS = glob config po doc
|
||||||
|
|
||||||
bin_PROGRAMS = make
|
bin_PROGRAMS = make
|
||||||
include_HEADERS = gnumake.h
|
include_HEADERS = src/gnumake.h
|
||||||
|
|
||||||
man_MANS = make.1
|
man_MANS = doc/make.1
|
||||||
|
|
||||||
make_SRCS = ar.c arscan.c commands.c commands.h debug.h default.c dep.h \
|
make_SRCS = src/ar.c src/arscan.c src/commands.c src/commands.h \
|
||||||
dir.c expand.c file.c filedef.h function.c getopt.c getopt.h \
|
src/debug.h src/default.c src/dep.h src/dir.c src/expand.c \
|
||||||
getopt1.c gettext.h guile.c hash.c hash.h implicit.c job.c \
|
src/file.c src/filedef.h src/function.c src/getopt.c \
|
||||||
job.h load.c loadapi.c main.c makeint.h misc.c os.h output.c \
|
src/getopt.h src/getopt1.c src/gettext.h src/guile.c \
|
||||||
output.h read.c remake.c rule.c rule.h signame.c strcache.c \
|
src/hash.c src/hash.h src/implicit.c src/job.c src/job.h \
|
||||||
variable.c variable.h version.c vpath.c
|
src/load.c src/loadapi.c src/main.c src/makeint.h src/misc.c \
|
||||||
|
src/os.h src/output.c src/output.h src/read.c src/remake.c \
|
||||||
|
src/rule.c src/rule.h src/signame.c src/strcache.c \
|
||||||
|
src/variable.c src/variable.h src/version.c src/vpath.c
|
||||||
|
|
||||||
glob_SRCS = glob/fnmatch.c glob/fnmatch.h glob/glob.c glob/glob.h
|
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 \
|
loadavg_SRCS = src/getloadavg.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 \
|
alloca_SRCS = src/alloca.c
|
||||||
vmsfunctions.c vmsify.c vmsjobs.c
|
|
||||||
|
|
||||||
amiga_SRCS = amiga.c amiga.h
|
w32_SRCS = src/w32/pathstuff.c src/w32/w32os.c src/w32/compat/dirent.c \
|
||||||
|
src/w32/compat/posixfcn.c src/w32/include/dirent.h \
|
||||||
|
src/w32/include/dlfcn.h src/w32/include/pathstuff.h \
|
||||||
|
src/w32/include/sub_proc.h src/w32/include/w32err.h \
|
||||||
|
src/w32/subproc/misc.c src/w32/subproc/proc.h \
|
||||||
|
src/w32/subproc/sub_proc.c src/w32/subproc/w32err.c
|
||||||
|
|
||||||
|
vms_SRCS = src/vms_exit.c src/vms_export_symbol.c src/vms_progname.c \
|
||||||
|
src/vmsdir.h src/vmsfunctions.c src/vmsify.c
|
||||||
|
|
||||||
|
amiga_SRCS = src/amiga.c src/amiga.h
|
||||||
|
|
||||||
make_SOURCES = $(make_SRCS)
|
make_SOURCES = $(make_SRCS)
|
||||||
EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
|
EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
|
||||||
|
@ -56,42 +64,44 @@ make_LDADD = $(GUILE_LIBS) $(LIBOBJS) $(ALLOCA) $(GLOBLIB) \
|
||||||
|
|
||||||
localedir = $(datadir)/locale
|
localedir = $(datadir)/locale
|
||||||
|
|
||||||
AM_CPPFLAGS = -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \
|
AM_CPPFLAGS = -Isrc -I$(srcdir)/src $(GLOBINC) -DLIBDIR=\"$(libdir)\" \
|
||||||
-DLOCALEDIR=\"$(localedir)\" $(GLOBINC)
|
-DINCLUDEDIR=\"$(includedir)\" -DLOCALEDIR=\"$(localedir)\"
|
||||||
|
|
||||||
AM_CFLAGS = $(GUILE_CFLAGS)
|
AM_CFLAGS = $(GUILE_CFLAGS)
|
||||||
|
|
||||||
if WINDOWSENV
|
if WINDOWSENV
|
||||||
make_SOURCES += $(w32_SRCS)
|
make_SOURCES += $(w32_SRCS)
|
||||||
AM_CPPFLAGS += -I $(top_srcdir)/w32/include
|
AM_CPPFLAGS += -I $(top_srcdir)/src/w32/include
|
||||||
else
|
else
|
||||||
make_SOURCES += posixos.c
|
make_SOURCES += src/posixos.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if USE_CUSTOMS
|
if USE_CUSTOMS
|
||||||
make_SOURCES += remote-cstms.c
|
make_SOURCES += src/remote-cstms.c
|
||||||
else
|
else
|
||||||
make_SOURCES += remote-stub.c
|
make_SOURCES += src/remote-stub.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Extra stuff to include in the distribution.
|
# Extra stuff to include in the distribution.
|
||||||
|
|
||||||
mk_FILES = Basic.mk mk/Amiga.mk mk/Windows32.mk mk/msdosdjgpp.mk
|
mk_FILES = Basic.mk mk/msdosdjgpp.mk mk/Amiga.mk mk/VMS.mk mk/Windows32.mk
|
||||||
|
# We don't need this, since the standard automake output will do.
|
||||||
|
#mk/Posix.mk.in
|
||||||
|
|
||||||
# test/scripts are added via dist-hook below.
|
|
||||||
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
|
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
|
||||||
tests/run_make_tests.pl tests/test_driver.pl \
|
tests/run_make_tests.pl tests/test_driver.pl \
|
||||||
tests/config-flags.pm.in tests/config_flags_pm.com \
|
tests/config-flags.pm.in tests/config_flags_pm.com \
|
||||||
tests/mkshadow tests/jhelp.pl tests/guile.supp tests/README
|
tests/mkshadow tests/jhelp.pl tests/guile.supp tests/README
|
||||||
|
# test/scripts are added via dist-hook below.
|
||||||
|
|
||||||
EXTRA_DIST = ChangeLog README build.sh.in $(man_MANS) \
|
EXTRA_DIST = ChangeLog README build.sh.in $(man_MANS) \
|
||||||
README.customs README.OS2 \
|
README.customs README.OS2 \
|
||||||
README.Amiga SCOPTIONS config.ami \
|
README.Amiga SCOPTIONS src/config.ami \
|
||||||
README.DOS builddos.bat configh.dos \
|
README.DOS builddos.bat src/configh.dos \
|
||||||
README.W32 config.h.W32 build_w32.bat \
|
README.W32 build_w32.bat src/config.h.W32 \
|
||||||
README.VMS makefile.vms makefile.com config.h-vms \
|
README.VMS makefile.com src/config.h-vms src/vmsjobs.c \
|
||||||
vms_export_symbol_test.com \
|
vms_export_symbol_test.com \
|
||||||
gmk-default.scm gmk-default.h \
|
src/gmk-default.scm src/gmk-default.h \
|
||||||
$(mk_FILES) $(test_FILES)
|
$(mk_FILES) $(test_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,12 +140,12 @@ install-exec-local:
|
||||||
|
|
||||||
# --------------- Generate the Guile default module content
|
# --------------- Generate the Guile default module content
|
||||||
|
|
||||||
guile.$(OBJEXT): gmk-default.h
|
src/guile.$(OBJEXT): src/gmk-default.h
|
||||||
gmk-default.h: $(srcdir)/gmk-default.scm
|
src/gmk-default.h: $(srcdir)/src/gmk-default.scm
|
||||||
(echo 'static const char *const GUILE_module_defn = " '\\ \
|
(echo 'static const char *const GUILE_module_defn = " '\\ \
|
||||||
&& sed -e 's/;.*//' -e '/^[ \t]*$$/d' -e 's/"/\\"/g' -e 's/$$/ \\/' \
|
&& sed -e 's/;.*//' -e '/^[ \t]*$$/d' -e 's/"/\\"/g' -e 's/$$/ \\/' \
|
||||||
$(srcdir)/gmk-default.scm \
|
$(srcdir)/src/gmk-default.scm \
|
||||||
&& echo '";') > $@
|
&& echo '";') > src/gmk-default.h
|
||||||
|
|
||||||
# --------------- Local DIST Section
|
# --------------- Local DIST Section
|
||||||
|
|
||||||
|
@ -169,8 +179,8 @@ check-loadavg: loadavg$(EXEEXT)
|
||||||
|
|
||||||
# The loadavg function is invoked during "make check" to test getloadavg.
|
# The loadavg function is invoked during "make check" to test getloadavg.
|
||||||
check_PROGRAMS = loadavg
|
check_PROGRAMS = loadavg
|
||||||
nodist_loadavg_SOURCES = getloadavg.c
|
nodist_loadavg_SOURCES = $(loadavg_SRCS)
|
||||||
loadavg_CPPFLAGS = -DTEST
|
loadavg_CPPFLAGS = -Isrc -I$(srcdir)/src -DTEST
|
||||||
loadavg_LDADD = @GETLOADAVG_LIBS@
|
loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||||
|
|
||||||
# > check-regression
|
# > check-regression
|
||||||
|
|
3
NEWS
3
NEWS
|
@ -43,6 +43,9 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set
|
||||||
N-processor systems with less fear of overload.
|
N-processor systems with less fear of overload.
|
||||||
Patch provided by Sven C. Dack <sven.c.dack@sky.com>
|
Patch provided by Sven C. Dack <sven.c.dack@sky.com>
|
||||||
|
|
||||||
|
* Rework the source distribution to move source files into the src/*
|
||||||
|
subdirectory. This aligns with modern best practices in GNU.
|
||||||
|
|
||||||
* The previous limit of 63 jobs under -jN on MS-Windows is now
|
* The previous limit of 63 jobs under -jN on MS-Windows is now
|
||||||
increased to 4095. That limit includes the subprocess started by
|
increased to 4095. That limit includes the subprocess started by
|
||||||
the $(shell) function.
|
the $(shell) function.
|
||||||
|
|
|
@ -67,7 +67,7 @@ To build from sources:
|
||||||
4. 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:
|
need to tell Make where the sources are, like this:
|
||||||
|
|
||||||
make srcdir=c:/djgpp/gnu/make
|
make -f c:/djgpp/gnu/make/Basic.mk SRCDIR=c:/djgpp/gnu/make
|
||||||
|
|
||||||
or:
|
or:
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ OPTIMIZE
|
||||||
NOVERSION
|
NOVERSION
|
||||||
OPTIMIZERTIME
|
OPTIMIZERTIME
|
||||||
OPTIMIZERALIAS
|
OPTIMIZERALIAS
|
||||||
|
DEFINE HAVE_CONFIG_H
|
||||||
DEFINE INCLUDEDIR="include:"
|
DEFINE INCLUDEDIR="include:"
|
||||||
DEFINE LIBDIR="lib:"
|
DEFINE LIBDIR="lib:"
|
||||||
DEFINE NO_ALLOCA
|
DEFINE NO_ALLOCA
|
||||||
|
|
|
@ -44,7 +44,6 @@ libdir=${exec_prefix}/lib
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
localedir=${prefix}/share/locale
|
localedir=${prefix}/share/locale
|
||||||
aliaspath=${localedir}${PATH_SEPARATOR}.
|
|
||||||
|
|
||||||
defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||||
|
|
||||||
|
@ -52,7 +51,7 @@ defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${in
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# These are all the objects we need to link together.
|
# These are all the objects we need to link together.
|
||||||
objs="%objs% remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
|
objs="%objs% src/remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
|
||||||
|
|
||||||
if [ x"$GLOBLIB" != x ]; then
|
if [ x"$GLOBLIB" != x ]; then
|
||||||
objs="$objs %globobjs%"
|
objs="$objs %globobjs%"
|
||||||
|
@ -63,7 +62,7 @@ fi
|
||||||
for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
|
for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
|
||||||
echo compiling ${file}...
|
echo compiling ${file}...
|
||||||
$CC $defines $CPPFLAGS $CFLAGS \
|
$CC $defines $CPPFLAGS $CFLAGS \
|
||||||
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file
|
-c -Isrc -I${srcdir}/src ${globinc} ${srcdir}/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
# The object files were actually all put in the current directory.
|
# The object files were actually all put in the current directory.
|
||||||
|
|
109
build_w32.bat
109
build_w32.bat
|
@ -24,6 +24,7 @@ if "%1" == "--help" goto Usage
|
||||||
set MAKE=gnumake
|
set MAKE=gnumake
|
||||||
set GUILE=Y
|
set GUILE=Y
|
||||||
set COMPILER=cl.exe
|
set COMPILER=cl.exe
|
||||||
|
set O=obj
|
||||||
set ARCH=x64
|
set ARCH=x64
|
||||||
set DEBUG=N
|
set DEBUG=N
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ goto ParseSW
|
||||||
|
|
||||||
:SetCC
|
:SetCC
|
||||||
set COMPILER=gcc
|
set COMPILER=gcc
|
||||||
|
set O=o
|
||||||
echo Building with GCC
|
echo Building with GCC
|
||||||
shift
|
shift
|
||||||
goto ParseSW
|
goto ParseSW
|
||||||
|
@ -146,58 +148,61 @@ if exist %OUTDIR%\nul rmdir /S /Q %OUTDIR%
|
||||||
|
|
||||||
:: Recreate it
|
:: Recreate it
|
||||||
mkdir %OUTDIR%
|
mkdir %OUTDIR%
|
||||||
|
mkdir %OUTDIR%\src
|
||||||
|
mkdir %OUTDIR%\src\w32
|
||||||
|
mkdir %OUTDIR%\src\w32\compat
|
||||||
|
mkdir %OUTDIR%\src\w32\subproc
|
||||||
mkdir %OUTDIR%\glob
|
mkdir %OUTDIR%\glob
|
||||||
mkdir %OUTDIR%\w32
|
|
||||||
mkdir %OUTDIR%\w32\compat
|
|
||||||
mkdir %OUTDIR%\w32\subproc
|
|
||||||
|
|
||||||
if "%GUILE%" == "Y" call :ChkGuile
|
if "%GUILE%" == "Y" call :ChkGuile
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Compiling %OUTDIR% version
|
echo Compiling %OUTDIR% version
|
||||||
|
|
||||||
if exist config.h.W32.template call :ConfigSCM
|
if exist src\config.h.W32.template call :ConfigSCM
|
||||||
copy config.h.W32 %OUTDIR%\config.h
|
copy src\config.h.W32 %OUTDIR%\src\config.h
|
||||||
|
|
||||||
call :Compile ar
|
if exist %OUTDIR%\link.sc del %OUTDIR%\link.sc
|
||||||
call :Compile arscan
|
|
||||||
call :Compile commands
|
call :Compile src\ar
|
||||||
call :Compile default
|
call :Compile src\arscan
|
||||||
call :Compile dir
|
call :Compile src\commands
|
||||||
call :Compile expand
|
call :Compile src\default
|
||||||
call :Compile file
|
call :Compile src\dir
|
||||||
call :Compile function
|
call :Compile src\expand
|
||||||
call :Compile getloadavg
|
call :Compile src\file
|
||||||
call :Compile getopt
|
call :Compile src\function
|
||||||
call :Compile getopt1
|
call :Compile src\getloadavg
|
||||||
|
call :Compile src\getopt
|
||||||
|
call :Compile src\getopt1
|
||||||
|
call :Compile src\guile GUILE
|
||||||
|
call :Compile src\hash
|
||||||
|
call :Compile src\implicit
|
||||||
|
call :Compile src\job
|
||||||
|
call :Compile src\load
|
||||||
|
call :Compile src\loadapi
|
||||||
|
call :Compile src\main GUILE
|
||||||
|
call :Compile src\misc
|
||||||
|
call :Compile src\output
|
||||||
|
call :Compile src\read
|
||||||
|
call :Compile src\remake
|
||||||
|
call :Compile src\remote-stub
|
||||||
|
call :Compile src\rule
|
||||||
|
call :Compile src\signame
|
||||||
|
call :Compile src\strcache
|
||||||
|
call :Compile src\variable
|
||||||
|
call :Compile src\version
|
||||||
|
call :Compile src\vpath
|
||||||
|
call :Compile src\w32\pathstuff
|
||||||
|
call :Compile src\w32\w32os
|
||||||
|
call :Compile src\w32\compat\posixfcn
|
||||||
|
call :Compile src\w32\subproc\misc
|
||||||
|
call :Compile src\w32\subproc\sub_proc
|
||||||
|
call :Compile src\w32\subproc\w32err
|
||||||
call :Compile glob\fnmatch
|
call :Compile glob\fnmatch
|
||||||
call :Compile glob\glob
|
call :Compile glob\glob
|
||||||
call :Compile guile GUILE
|
|
||||||
call :Compile hash
|
|
||||||
call :Compile implicit
|
|
||||||
call :Compile job
|
|
||||||
call :Compile load
|
|
||||||
call :Compile loadapi
|
|
||||||
call :Compile main GUILE
|
|
||||||
call :Compile misc
|
|
||||||
call :Compile output
|
|
||||||
call :Compile read
|
|
||||||
call :Compile remake
|
|
||||||
call :Compile remote-stub
|
|
||||||
call :Compile rule
|
|
||||||
call :Compile signame
|
|
||||||
call :Compile strcache
|
|
||||||
call :Compile variable
|
|
||||||
call :Compile version
|
|
||||||
call :Compile vpath
|
|
||||||
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
|
|
||||||
|
|
||||||
if not "%COMPILER%" == "gcc" call :Compile w32\compat\dirent
|
if not "%COMPILER%" == "gcc" call :Compile src\w32\compat\dirent
|
||||||
|
|
||||||
call :Link
|
call :Link
|
||||||
|
|
||||||
|
@ -208,21 +213,21 @@ if exist %OUTDIR%\%MAKE%.exe copy /Y Basic.mk Makefile
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:Compile
|
:Compile
|
||||||
|
echo %OUTDIR%\%1.%O% >>%OUTDIR%\link.sc
|
||||||
set EXTRAS=
|
set EXTRAS=
|
||||||
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
|
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
|
||||||
if "%COMPILER%" == "gcc" goto GccCompile
|
if "%COMPILER%" == "gcc" goto GccCompile
|
||||||
|
|
||||||
:: MSVC Compile
|
:: MSVC Compile
|
||||||
echo on
|
echo on
|
||||||
%COMPILER% /nologo /MT /W4 /EHsc %OPTS% /I %OUTDIR% /I . /I glob /I w32/include /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.obj /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c
|
%COMPILER% /nologo /MT /W4 /EHsc %OPTS% /I %OUTDIR%/src /I src /I glob /I src/w32/include /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.%O% /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c
|
||||||
@echo off
|
@echo off
|
||||||
echo %OUTDIR%\%1.obj >>%OUTDIR%\link.sc
|
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:GccCompile
|
:GccCompile
|
||||||
:: GCC Compile
|
:: GCC Compile
|
||||||
echo on
|
echo on
|
||||||
gcc -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%\%1.o -c %1.c
|
gcc -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I./glob -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%\%1.%O% -c %1.c
|
||||||
@echo off
|
@echo off
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
|
@ -240,18 +245,19 @@ goto :EOF
|
||||||
:GccLink
|
:GccLink
|
||||||
:: GCC Link
|
:: GCC Link
|
||||||
echo on
|
echo on
|
||||||
gcc -mthreads -gdwarf-2 -g3 -o %OUTDIR%\%MAKE%.exe %OUTDIR%\variable.o %OUTDIR%\rule.o %OUTDIR%\remote-stub.o %OUTDIR%\commands.o %OUTDIR%\file.o %OUTDIR%\getloadavg.o %OUTDIR%\default.o %OUTDIR%\signame.o %OUTDIR%\expand.o %OUTDIR%\dir.o %OUTDIR%\main.o %OUTDIR%\getopt1.o %OUTDIR%\guile.o %OUTDIR%\job.o %OUTDIR%\output.o %OUTDIR%\read.o %OUTDIR%\version.o %OUTDIR%\getopt.o %OUTDIR%\arscan.o %OUTDIR%\remake.o %OUTDIR%\misc.o %OUTDIR%\hash.o %OUTDIR%\strcache.o %OUTDIR%\ar.o %OUTDIR%\function.o %OUTDIR%\vpath.o %OUTDIR%\implicit.o %OUTDIR%\loadapi.o %OUTDIR%\load.o %OUTDIR%\glob\glob.o %OUTDIR%\glob\fnmatch.o %OUTDIR%\w32\pathstuff.o %OUTDIR%\w32\compat\posixfcn.o %OUTDIR%\w32\w32os.o %OUTDIR%\w32\subproc\misc.o %OUTDIR%\w32\subproc\sub_proc.o %OUTDIR%\w32\subproc\w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=%OUTDIR%\libgnumake-1.dll.a
|
echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
|
||||||
|
gcc -mthreads -gdwarf-2 -g3 %OPTS% -o %OUTDIR%\%MAKE%.exe @%OUTDIR%\link.sc -Wl,--out-implib=%OUTDIR%\libgnumake-1.dll.a
|
||||||
@echo off
|
@echo off
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:ConfigSCM
|
:ConfigSCM
|
||||||
echo Generating config from SCM templates
|
echo Generating config from SCM templates
|
||||||
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > %OUTDIR%\config.h.W32.sed
|
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > %OUTDIR%\src\config.h.W32.sed
|
||||||
echo s,%%PACKAGE%%,make,g >> %OUTDIR%\config.h.W32.sed
|
echo s,%%PACKAGE%%,make,g >> %OUTDIR%\src\config.h.W32.sed
|
||||||
sed -f %OUTDIR%\config.h.W32.sed config.h.W32.template > config.h.W32
|
sed -f %OUTDIR%\src\config.h.W32.sed src\config.h.W32.template > src\config.h.W32
|
||||||
echo static const char *const GUILE_module_defn = ^" \> gmk-default.h
|
echo static const char *const GUILE_module_defn = ^" \ > src\gmk-default.h
|
||||||
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" gmk-default.scm >> gmk-default.h
|
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" src\gmk-default.scm >> src\gmk-default.h
|
||||||
echo ^";>> gmk-default.h
|
echo ^";>> src\gmk-default.h
|
||||||
goto :EOF
|
goto :EOF
|
||||||
|
|
||||||
:ChkGuile
|
:ChkGuile
|
||||||
|
@ -318,6 +324,7 @@ set GUILELIBS=
|
||||||
set LINKOPTS=
|
set LINKOPTS=
|
||||||
set MAKE=
|
set MAKE=
|
||||||
set NOGUILE=
|
set NOGUILE=
|
||||||
|
set O=
|
||||||
set OPTS=
|
set OPTS=
|
||||||
set OUTDIR=
|
set OUTDIR=
|
||||||
set PKGMSC=
|
set PKGMSC=
|
||||||
|
|
56
builddos.bat
56
builddos.bat
|
@ -31,39 +31,39 @@ if not "%XSRC%"=="%1" goto SmallEnv
|
||||||
|
|
||||||
:SrcDone
|
:SrcDone
|
||||||
|
|
||||||
copy /Y %XSRC%/configh.dos ./config.h
|
copy /Y %XSRC%/src/configh.dos ./src/config.h
|
||||||
|
|
||||||
if not exist glob mkdir glob
|
if not exist glob mkdir glob
|
||||||
|
|
||||||
rem Echo ON so they will see what is going on.
|
rem Echo ON so they will see what is going on.
|
||||||
@echo 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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/src/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%/src -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
|
gcc -c -I%XSRC%/src -I%XSRC%/glob -DHAVE_CONFIG_H -O2 -g %XSRC%/glob/fnmatch.c -o glob/fnmatch.o
|
||||||
@echo off
|
@echo off
|
||||||
echo commands.o > respf.$$$
|
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 (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||||
|
|
|
@ -22,8 +22,11 @@ AC_PREREQ([2.69])
|
||||||
|
|
||||||
# Autoconf setup
|
# Autoconf setup
|
||||||
AC_CONFIG_AUX_DIR([config])
|
AC_CONFIG_AUX_DIR([config])
|
||||||
AC_CONFIG_SRCDIR([vpath.c])
|
AC_CONFIG_SRCDIR([src/vpath.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([src/config.h])
|
||||||
|
|
||||||
|
# For now all our libobj code is in src/
|
||||||
|
AC_CONFIG_LIBOBJ_DIR([src])
|
||||||
|
|
||||||
# Automake setup
|
# Automake setup
|
||||||
# We have to enable "foreign" because ChangeLog is auto-generated
|
# We have to enable "foreign" because ChangeLog is auto-generated
|
||||||
|
@ -505,6 +508,8 @@ AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes],
|
||||||
# Specify what files are to be created.
|
# Specify what files are to be created.
|
||||||
AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \
|
AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \
|
||||||
doc/Makefile tests/config-flags.pm])
|
doc/Makefile tests/config-flags.pm])
|
||||||
|
# We don't need this, since the standard automake output will do.
|
||||||
|
#mk/Posix.mk
|
||||||
|
|
||||||
# OK, do it!
|
# OK, do it!
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
||||||
# -Wwrite-strings
|
# -Wwrite-strings
|
||||||
|
|
||||||
TEMPLATES = README README.DOS README.W32 README.OS2 \
|
TEMPLATES = README README.DOS README.W32 README.OS2 \
|
||||||
config.ami configh.dos config.h.W32 config.h-vms
|
src/config.ami src/configh.dos src/config.h.W32 src/config.h-vms
|
||||||
|
|
||||||
# Create preprocessor output files--GCC specific!
|
# Create preprocessor output files--GCC specific!
|
||||||
%.i : %.c
|
%.i : %.c
|
||||||
|
@ -53,19 +53,22 @@ $(TEMPLATES) : % : %.template Makefile
|
||||||
|
|
||||||
# Construct Makefiles by adding on dependencies, etc.
|
# Construct Makefiles by adding on dependencies, etc.
|
||||||
#
|
#
|
||||||
|
srccvt = $(patsubst src/%,$$(src)%,$(filter %.c,$1))
|
||||||
Basic.mk: Basic.mk.template .dep_segment Makefile
|
Basic.mk: Basic.mk.template .dep_segment Makefile
|
||||||
rm -f $@
|
rm -f $@
|
||||||
sed -e 's@%VERSION%@$(VERSION)@g' \
|
sed -e 's@%VERSION%@$(VERSION)@g' \
|
||||||
-e 's@%make_SOURCES%@$(filter %.c,$(make_SRCS))@g' \
|
-e 's@%make_SOURCES%@$(call srccvt,$(make_SRCS))@g' \
|
||||||
-e 's@%glob_SOURCES%@$(filter %.c,$(glob_SRCS))@g' \
|
-e 's@%glob_SOURCES%@$(patsubst glob/%,$$(glob)%,$(filter %.c,$(glob_SRCS)))@g' \
|
||||||
-e 's@%w32_SOURCES%@$(filter %.c,$(w32_SRCS))@g' \
|
-e 's@%loadavg_SOURCES%@$(call srccvt,$(loadavg_SRCS))@g' \
|
||||||
-e 's@%vms_SOURCES%@$(filter %.c,$(vms_SRCS))@g' \
|
-e 's@%alloca_SOURCES%@$(call srccvt,$(alloca_SRCS))@g' \
|
||||||
-e 's@%amiga_SOURCES%@$(filter %.c,$(amiga_SRCS))@g' \
|
-e 's@%w32_SOURCES%@$(call srccvt,$(w32_SRCS))@g' \
|
||||||
|
-e 's@%vms_SOURCES%@$(call srccvt,$(vms_SRCS))@g' \
|
||||||
|
-e 's@%amiga_SOURCES%@$(call srccvt,$(amiga_SRCS))@g' \
|
||||||
$< > $@
|
$< > $@
|
||||||
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
||||||
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)/\1.$$(OBJEXT):@' \
|
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)\1.$$(OBJEXT):@' \
|
||||||
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
|
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
|
||||||
-e 's@$$(SRCDIR)/config.h@$$(OUTDIR)/config.h@g' \
|
-e 's@$$(SRCDIR)/src/config.h@$$(OUTDIR)src/config.h@g' \
|
||||||
$(word 2,$^) >>$@
|
$(word 2,$^) >>$@
|
||||||
chmod a-w $@
|
chmod a-w $@
|
||||||
|
|
||||||
|
@ -73,7 +76,7 @@ Basic.mk: Basic.mk.template .dep_segment Makefile
|
||||||
#
|
#
|
||||||
build.sh.in: build.template Makefile
|
build.sh.in: build.template Makefile
|
||||||
rm -f $@
|
rm -f $@
|
||||||
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
|
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out src/remote-%,$(make_OBJECTS)))@g' \
|
||||||
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(filter %.c,$(glob_SRCS)))@g' \
|
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(filter %.c,$(glob_SRCS)))@g' \
|
||||||
$< > $@
|
$< > $@
|
||||||
chmod a-w+x $@
|
chmod a-w+x $@
|
||||||
|
@ -84,10 +87,10 @@ build.sh.in: build.template Makefile
|
||||||
# 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.
|
# to do it ourselves.
|
||||||
#
|
#
|
||||||
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
|
DEP_FILES := $(wildcard src/$(DEPDIR)/*.Po)
|
||||||
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
||||||
rm -f $@
|
rm -f $@
|
||||||
(for f in $(DEPDIR)/*.Po; do \
|
(for f in src/$(DEPDIR)/*.Po; do \
|
||||||
echo ""; \
|
echo ""; \
|
||||||
echo "# $$f"; \
|
echo "# $$f"; \
|
||||||
sed -e '/^[^:]*\.[ch] *:/d' \
|
sed -e '/^[^:]*\.[ch] *:/d' \
|
||||||
|
@ -157,7 +160,7 @@ move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
||||||
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||||
|
|
||||||
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
||||||
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
po_repo = https://translationproject.org/latest/$(PACKAGE)
|
||||||
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
|
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
|
||||||
|
|
||||||
.PHONY: do-po-update po-update
|
.PHONY: do-po-update po-update
|
||||||
|
@ -182,8 +185,8 @@ po-update:
|
||||||
# with each of the files that belongs to some other package and is
|
# with each of the files that belongs to some other package and is
|
||||||
# regularly updated from the specified URL.
|
# regularly updated from the specified URL.
|
||||||
|
|
||||||
cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
cvs-url = https://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||||
git-url = http://git.savannah.gnu.org/cgit
|
git-url = https://git.savannah.gnu.org/cgit
|
||||||
target = $(patsubst get-%,%,$@)
|
target = $(patsubst get-%,%,$@)
|
||||||
|
|
||||||
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
|
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
|
||||||
|
@ -231,22 +234,51 @@ check-alt-config: \
|
||||||
# Trick GNU make so it doesn't run the submake as a recursive make.
|
# Trick GNU make so it doesn't run the submake as a recursive make.
|
||||||
NR_MAKE = $(MAKE)
|
NR_MAKE = $(MAKE)
|
||||||
|
|
||||||
# Check builds both with build.sh and with make
|
# Check builds both with build.sh and with make and with Basic.mk
|
||||||
checkcfg.%: distdir
|
checkcfg.%: distdir
|
||||||
@echo "Building $@ (output in checkcfg.$*.log)"
|
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||||
@exec >'checkcfg.$*.log' 2>&1; \
|
exec >'checkcfg.$*.log' 2>&1; \
|
||||||
rm -rf $(distdir)/_build \
|
rm -rf $(distdir)/_build \
|
||||||
&& mkdir $(distdir)/_build \
|
&& mkdir $(distdir)/_build \
|
||||||
&& cd $(distdir)/_build \
|
&& cd $(distdir)/_build \
|
||||||
&& echo "Testing configure with $(subst ^,=,$*)" \
|
&& echo "Testing configure with $(subst ^,=,$*)" \
|
||||||
&& ../configure --srcdir=.. $(subst ^,=,$*) \
|
&& ../configure --srcdir=.. $(subst ^,=,$*) \
|
||||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
||||||
CFLAGS='$(AM_CFLAGS)' \
|
exec >>'checkcfg.$*.log' 2>&1; \
|
||||||
|
cd $(distdir)/_build \
|
||||||
&& ./build.sh \
|
&& ./build.sh \
|
||||||
&& ./make $(AM_MAKEFLAGS) check \
|
&& ./make $(AM_MAKEFLAGS) check \
|
||||||
&& rm -f *.o make \
|
&& ./make $(AM_MAKEFLAGS) clean
|
||||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) \
|
exec >>'checkcfg.$*.log' 2>&1; \
|
||||||
&& ./make $(AM_MAKEFLAGS) check
|
cd $(distdir)/_build \
|
||||||
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) CFLAGS='$(AM_CFLAGS)' \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) check \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) clean
|
||||||
|
|
||||||
|
# Try the different build methods
|
||||||
|
checkcfg.basicmk: checkcfg.% : distdir
|
||||||
|
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||||
|
exec >'checkcfg.$*.log' 2>&1; \
|
||||||
|
rm -rf $(distdir)/_build \
|
||||||
|
&& mkdir $(distdir)/_build \
|
||||||
|
&& cd $(distdir)/_build \
|
||||||
|
&& echo "Testing Basic.mk SRCDIR=.." \
|
||||||
|
&& ../configure --srcdir=.. \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
||||||
|
exec >>'checkcfg.$*.log' 2>&1; \
|
||||||
|
cd $(distdir)/_build \
|
||||||
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk CFLAGS='$(AM_CFLAGS)' SRCDIR=.. \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. check \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. clean
|
||||||
|
exec >>'checkcfg.$*.log' 2>&1; \
|
||||||
|
echo "Testing Basic.mk SRCDIR=." \
|
||||||
|
&& rm -rf $(distdir)/_build \
|
||||||
|
&& cd $(distdir) \
|
||||||
|
&& ./configure \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk CFLAGS='$(AM_CFLAGS)' \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) -f Basic.mk check \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) -f Basic.mk clean
|
||||||
|
|
||||||
|
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
|
@ -273,11 +305,11 @@ changelog-check:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||||
# Ignore makeint.h; it defines _().
|
# Ignore src/makeint.h; it defines _().
|
||||||
po-check:
|
po-check:
|
||||||
if test -f po/POTFILES.in; then \
|
if test -f po/POTFILES.in; then \
|
||||||
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||||
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "./makeint.h" || print "$$ARGV\n" and close ARGV }' `find . -name '*.[ch]'` | sed 's,^\./,,' | sort > $@-2; \
|
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "./src/makeint.h" || print "$$ARGV\n" and close ARGV }' `find . -name '*.[ch]'` | sed 's,^\./,,' | sort > $@-2; \
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
rm -f $@-1 $@-2; \
|
rm -f $@-1 $@-2; \
|
||||||
fi
|
fi
|
||||||
|
|
180
makefile.vms
180
makefile.vms
|
@ -1,180 +0,0 @@
|
||||||
# -*-Makefile-*- to build GNU make on VMS
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
# VMS extensions from GNU Make 3.60 imported by
|
|
||||||
# Klaus Kämpf (kkaempf@rmi.de)
|
|
||||||
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
|
||||||
# Modified for version 3.80 by zinser@decus.de
|
|
||||||
# Modified for versions 3.81, 3.99.90 by Hartmut Becker
|
|
||||||
|
|
||||||
CC = cc
|
|
||||||
CP = copy
|
|
||||||
|
|
||||||
%.obj: %.c
|
|
||||||
$(CC) $(CFLAGS)/obj=$@ $<
|
|
||||||
#
|
|
||||||
# Makefile for GNU Make
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(CC),cc)
|
|
||||||
cinclude = /nested=none/include=([],[.glob])
|
|
||||||
cprefix = /prefix=(all,except=(glob,globfree))
|
|
||||||
cwarn = /standard=relaxed/warn=(disable=questcompare)
|
|
||||||
CFLAGS = $(defines) $(cinclude)$(cprefix)$(cwarn)
|
|
||||||
else
|
|
||||||
CFLAGS = $(defines) $(cinclude)
|
|
||||||
endif
|
|
||||||
#LDFLAGS = /deb
|
|
||||||
LDFLAGS =
|
|
||||||
|
|
||||||
ifeq ($(CC),cc)
|
|
||||||
defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file")
|
|
||||||
else
|
|
||||||
ifeq ($(ARCH),VAX)
|
|
||||||
defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE","VAX")
|
|
||||||
else
|
|
||||||
defines = /define=("HAVE_CONFIG_H","GCC_IS_NATIVE")
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
LOAD_AVG = /define="NO_LDAV"
|
|
||||||
|
|
||||||
# If you don't want archive support, comment these out.
|
|
||||||
ARCHIVES = ,ar.obj,arscan.obj
|
|
||||||
ARCHIVES_SRC = ar.c arscan.c
|
|
||||||
|
|
||||||
# If your system needs extra libraries loaded in, define them here.
|
|
||||||
# System V probably need -lPW for alloca.
|
|
||||||
# if on vax, uncomment the following line
|
|
||||||
#LOADLIBES = ,c.opt/opt
|
|
||||||
ifeq ($(CC),cc)
|
|
||||||
#LOADLIBES =,sys$$library:vaxcrtl.olb/lib
|
|
||||||
CRT0 =
|
|
||||||
else
|
|
||||||
LOADLIBES =,gnu_cc_library:libgcc.olb/lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
# If your system doesn't have alloca, or the one provided is bad,
|
|
||||||
# get it from the Emacs distribution and define these.
|
|
||||||
#ALLOCA = ,alloca.obj
|
|
||||||
#ALLOCASRC = alloca.c
|
|
||||||
|
|
||||||
# If there are remote execution facilities defined,
|
|
||||||
# enable them with switches here (see remote-*.c).
|
|
||||||
REMOTE =
|
|
||||||
|
|
||||||
# Any extra object files your system needs.
|
|
||||||
extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
|
|
||||||
#,directory.obj
|
|
||||||
# as an alternative:
|
|
||||||
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
|
||||||
getopt = ,getopt.obj,getopt1.obj
|
|
||||||
# Directory to install 'make' in.
|
|
||||||
bindir = []
|
|
||||||
# Directory to install the man page in.
|
|
||||||
mandir = []
|
|
||||||
# Number to put on the man page filename.
|
|
||||||
manext = 1
|
|
||||||
|
|
||||||
guile = ,guile.obj
|
|
||||||
|
|
||||||
objs = commands.obj,job.obj,output.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
|
||||||
load.obj,main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
|
||||||
default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
|
||||||
vpath.obj,version.obj,vms_progname.obj,vms_exit.obj,\
|
|
||||||
vms_export_symbol.obj$(guile)$(ARCHIVES)$(extras)$(getopt)$(glob)
|
|
||||||
|
|
||||||
srcs = commands.c job.c output.c dir.c file.c misc.c guile.c hash.c \
|
|
||||||
load.c main.c read.c remake.c rule.c implicit.c \
|
|
||||||
default.c variable.c expand.c function.c strcache.c \
|
|
||||||
vpath.c version.c vmsfunctions.c vmsify.c vms_progname.c vms_exit.c \
|
|
||||||
vms_export_symbol.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
|
||||||
commands.h dep.h filedef.h job.h output.h makeint.h rule.h variable.h
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all doc
|
|
||||||
all: config.h make.exe
|
|
||||||
|
|
||||||
doc: make.info make.dvi
|
|
||||||
|
|
||||||
|
|
||||||
make.exe: $(objs)
|
|
||||||
$(LD)$(LDFLAGS)/exe=$@ $^$(LOADLIBES)$(CRT0)
|
|
||||||
|
|
||||||
.PHONY: clean realclean
|
|
||||||
clean:
|
|
||||||
-purge [...]
|
|
||||||
-$(RM) make.exe;,*.obj;
|
|
||||||
-$(RM) [.glob]*.obj;
|
|
||||||
|
|
||||||
ar.obj: ar.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h dep.h \
|
|
||||||
[.glob]fnmatch.h
|
|
||||||
arscan.obj: arscan.c makeint.h config.h gnumake.h gettext.h
|
|
||||||
commands.obj: commands.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h dep.h variable.h job.h output.h commands.h
|
|
||||||
default.obj: default.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h variable.h rule.h dep.h job.h output.h commands.h
|
|
||||||
dir.obj: dir.c makeint.h config.h gnumake.h gettext.h hash.h filedef.h \
|
|
||||||
dep.h [.glob]glob.h
|
|
||||||
expand.obj: expand.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h job.h output.h commands.h variable.h rule.h
|
|
||||||
file.obj: file.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
|
||||||
dep.h job.h output.h commands.h variable.h debug.h
|
|
||||||
[.glob]fnmatch.obj: [.glob]fnmatch.c config.h [.glob]fnmatch.h
|
|
||||||
function.obj: function.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h variable.h dep.h job.h output.h commands.h debug.h
|
|
||||||
getopt.obj: getopt.c config.h gettext.h getopt.h
|
|
||||||
getopt1.obj: getopt1.c config.h getopt.h
|
|
||||||
[.glob]glob.obj: [.glob]glob.c config.h [.glob]fnmatch.h [.glob]glob.h
|
|
||||||
guile.obj: guile.c makeint.h config.h gnumake.h gettext.h
|
|
||||||
hash.obj: hash.c makeint.h config.h gnumake.h gettext.h hash.h
|
|
||||||
implicit.obj: implicit.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h rule.h dep.h debug.h variable.h job.h output.h commands.h
|
|
||||||
job.obj: job.c makeint.h config.h gnumake.h gettext.h job.h output.h debug.h \
|
|
||||||
filedef.h hash.h commands.h variable.h debug.h vmsjobs.c
|
|
||||||
load.obj: load.c makeint.h config.h gnumake.h gettext.h
|
|
||||||
main.obj: main.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
|
||||||
dep.h variable.h job.h output.h commands.h rule.h debug.h getopt.h
|
|
||||||
misc.obj: misc.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
|
||||||
dep.h debug.h
|
|
||||||
output.obj: output.c makeint.h config.h gnumake.h gettext.h job.h output.h
|
|
||||||
read.obj: read.c makeint.h config.h gnumake.h gettext.h [.glob]glob.h \
|
|
||||||
filedef.h hash.h dep.h job.h output.h commands.h variable.h rule.h \
|
|
||||||
debug.h
|
|
||||||
remake.obj: remake.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h job.h output.h commands.h dep.h variable.h debug.h
|
|
||||||
remote-stub.obj: remote-stub.c makeint.h config.h gnumake.h gettext.h \
|
|
||||||
filedef.h hash.h job.h output.h commands.h
|
|
||||||
rule.obj: rule.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
|
||||||
dep.h job.h output.h commands.h variable.h rule.h
|
|
||||||
signame.obj: signame.c makeint.h config.h gnumake.h gettext.h
|
|
||||||
strcache.obj: strcache.c makeint.h config.h gnumake.h gettext.h hash.h
|
|
||||||
variable.obj: variable.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
|
||||||
hash.h dep.h job.h output.h commands.h variable.h rule.h
|
|
||||||
version.obj: version.c config.h
|
|
||||||
vmsfunctions.obj: vmsfunctions.c makeint.h config.h gnumake.h gettext.h \
|
|
||||||
debug.h job.h output.h vmsdir.h
|
|
||||||
vmsify.obj: vmsify.c
|
|
||||||
vpath.obj: vpath.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
|
||||||
variable.h
|
|
||||||
vms_progname.obj: vms_progname.c
|
|
||||||
vms_exit.obj: vms_exit.c
|
|
||||||
vms_export_symbol.obj: vms_export_symbol.c
|
|
||||||
|
|
||||||
config.h: config.h-vms
|
|
||||||
$(CP) $< $@
|
|
11
mk/Amiga.mk
11
mk/Amiga.mk
|
@ -20,16 +20,19 @@
|
||||||
|
|
||||||
CC = sc
|
CC = sc
|
||||||
LD = $(CC) Link
|
LD = $(CC) Link
|
||||||
|
|
||||||
RM = delete
|
RM = delete
|
||||||
MKDIR = makedir
|
MKDIR = makedir
|
||||||
|
CP = copy
|
||||||
|
CP.cmd = $(CP) $< To $@
|
||||||
|
|
||||||
CPPFLAGS =
|
CPPFLAGS =
|
||||||
CFLAGS =
|
CFLAGS =
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
prog_SOURCES += alloca.c getloadavg.c $(glob_SOURCES) $(amiga_SOURCES)
|
prog_SOURCES += $(alloca_SOURCES) $(loadavg_SOURCES) $(glob_SOURCES) $(amiga_SOURCES)
|
||||||
|
|
||||||
extra_CPPFLAGS = IDir "" IDir $(SRCDIR)/glob
|
extra_CPPFLAGS = IDir $(OUTDIR)src IDir $(SRCDIR)/src IDir $(SRCDIR)/glob
|
||||||
|
|
||||||
C_SOURCE =
|
C_SOURCE =
|
||||||
OUTPUT_OPTION =
|
OUTPUT_OPTION =
|
||||||
|
@ -37,5 +40,5 @@ LDFLAGS = From LIB:cres.o
|
||||||
LDLIBS = Lib LIB:sc.lib LIB:amiga.lib
|
LDLIBS = Lib LIB:sc.lib LIB:amiga.lib
|
||||||
LINK_OUTPUT = To $@
|
LINK_OUTPUT = To $@
|
||||||
|
|
||||||
$(OUTDIR)/config.h: $(SRCDIR)/config.ami
|
$(OUTDIR)src/config.h: $(SRCDIR)/src/config.ami
|
||||||
copy $< To $@
|
$(CP.cmd)
|
||||||
|
|
27
mk/Posix.mk.in
Normal file
27
mk/Posix.mk.in
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# GNU -*-Makefile-*- to build GNU make on POSIX systems
|
||||||
|
#
|
||||||
|
# POSIX 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
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
# Very little is needed here since the default Basic.mk assumes POSIX
|
||||||
|
|
||||||
|
prog_SOURCES += $(posix_SOURCES)
|
||||||
|
|
||||||
|
extra_CPPFLAGS += @GUILE_CFLAGS@ @GLOBINC@
|
||||||
|
extra_LDFLAGS += @AM_LDFLAGS@
|
||||||
|
LDLIBS += @GUILE_LIBS@ @LIBOBJS@ @GETLOADAVG_LIBS@ @GLOBLIB@ @ALLOCA@ @LIBINTL@ @LIBS@
|
91
mk/VMS.mk
Normal file
91
mk/VMS.mk
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
# GNU -*-Makefile-*- to build GNU make on VMS
|
||||||
|
#
|
||||||
|
# VMS 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
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
src = [.src]
|
||||||
|
glob = [.glob]
|
||||||
|
SRCDIR = []
|
||||||
|
|
||||||
|
OBJEXT = .obj
|
||||||
|
EXEEXT = .exe
|
||||||
|
|
||||||
|
CP = copy
|
||||||
|
MKDIR = create/dir
|
||||||
|
RM = delete
|
||||||
|
|
||||||
|
e =
|
||||||
|
s = $e $e
|
||||||
|
c = ,
|
||||||
|
|
||||||
|
defs = HAVE_CONFIG_H
|
||||||
|
|
||||||
|
ifeq ($(CC),cc)
|
||||||
|
defs += VMS unlink=remove allocated_variable_expand_for_file=alloc_var_expand_for_file
|
||||||
|
else
|
||||||
|
defs += GCC_IS_NATIVE
|
||||||
|
ifeq ($(ARCH),VAX)
|
||||||
|
defs += VAX
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
extra_CPPFLAGS = /define=($(subst $s,$c,$(patsubst %,"%",$(defs))))
|
||||||
|
|
||||||
|
cinclude = /nested=none/include=($(src),$(glob))
|
||||||
|
ifeq ($(CC),cc)
|
||||||
|
cprefix = /prefix=(all,except=(glob,globfree))
|
||||||
|
cwarn = /standard=relaxed/warn=(disable=questcompare)
|
||||||
|
endif
|
||||||
|
|
||||||
|
extra_CFLAGS = $(cinclude)$(cprefix)$(cwarn)
|
||||||
|
|
||||||
|
#extra_LDFLAGS = /deb
|
||||||
|
extra_LDFLAGS =
|
||||||
|
|
||||||
|
# If your system needs extra libraries loaded in, define them here.
|
||||||
|
# System V probably need -lPW for alloca.
|
||||||
|
# if on vax, uncomment the following line
|
||||||
|
#LDLIBS = ,c.opt/opt
|
||||||
|
ifeq ($(CC),cc)
|
||||||
|
#LDLIBS =,sys$$library:vaxcrtl.olb/lib
|
||||||
|
else
|
||||||
|
LDLIBS =,gnu_cc_library:libgcc.olb/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
# If your system doesn't have alloca, or the one provided is bad,
|
||||||
|
# uncomment this
|
||||||
|
#ALLOCA = $(alloca_SOURCES)
|
||||||
|
|
||||||
|
prog_SOURCES += $(ALLOCA) $(glob_SOURCES) $(vms_SOURCES)
|
||||||
|
|
||||||
|
COMPILE.cmd = $(CC) $(extra_CFLAGS)$(CFLAGS)/obj=$@ $(extra_CPPFLAGS)$(CPPFLAGS) $<
|
||||||
|
|
||||||
|
LINK.cmd = $(LD)$(extra_LDFLAGS)$(LDFLAGS)/exe=$@ $(subst $s,$c,$^)$(LDLIBS)
|
||||||
|
|
||||||
|
# Don't know how to do this
|
||||||
|
CHECK.cmd =
|
||||||
|
|
||||||
|
define RM.cmd
|
||||||
|
-purge [...]
|
||||||
|
-$(RM) $(PROG);
|
||||||
|
-$(RM) $(src)*.$(OBJEXT);
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTDIR)$(src)config.h: $(SRCDIR)$(src)config.h.W32
|
||||||
|
$(CP.cmd)
|
|
@ -1,6 +1,6 @@
|
||||||
# GNU -*-Makefile-*- to build GNU make on Windows
|
# GNU -*-Makefile-*- to build GNU make on Windows
|
||||||
#
|
#
|
||||||
# Windows overrides for use with Makebase.mk.
|
# Windows overrides for use with Basic.mk.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017 Free Software Foundation, Inc.
|
# Copyright (C) 2017 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
|
@ -25,7 +25,7 @@ TARGET_TYPE = release
|
||||||
TOOLCHAIN = msvc
|
TOOLCHAIN = msvc
|
||||||
|
|
||||||
|
|
||||||
prog_SOURCES += getloadavg.c $(glob_SOURCES) $(w32_SOURCES)
|
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES) $(w32_SOURCES)
|
||||||
|
|
||||||
w32_LIBS = kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 \
|
w32_LIBS = kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 \
|
||||||
oleaut32 uuid odbc32 odbccp32
|
oleaut32 uuid odbc32 odbccp32
|
||||||
|
@ -39,7 +39,7 @@ msvc_CC = cl.exe
|
||||||
msvc_LD = link.exe
|
msvc_LD = link.exe
|
||||||
|
|
||||||
msvc_CPPFLAGS = /DHAVE_CONFIG_H /DWINDOWS32 /DWIN32 /D_CONSOLE
|
msvc_CPPFLAGS = /DHAVE_CONFIG_H /DWINDOWS32 /DWIN32 /D_CONSOLE
|
||||||
msvc_CPPFLAGS += /I$(OUTDIR) /I$(SRCDIR) /I$(SRCDIR)/glob /I$(SRCDIR)/w32/include
|
msvc_CPPFLAGS += /I$(OUTDIR)src /I$(SRCDIR)/src /I$(SRCDIR)/glob /I$(SRCDIR)/src/w32/include
|
||||||
|
|
||||||
msvc_CFLAGS = /nologo /MT /W4 /EHsc
|
msvc_CFLAGS = /nologo /MT /W4 /EHsc
|
||||||
msvc_CFLAGS += /FR$(OUTDIR) /Fp$(BASE_PROG).pch /Fd$(BASE_PROG).pdb
|
msvc_CFLAGS += /FR$(OUTDIR) /Fp$(BASE_PROG).pch /Fd$(BASE_PROG).pdb
|
||||||
|
@ -52,11 +52,11 @@ msvc_C_SOURCE = /c
|
||||||
msvc_OUTPUT_OPTION = /Fo$@
|
msvc_OUTPUT_OPTION = /Fo$@
|
||||||
msvc_LINK_OUTPUT = /OUT:$@
|
msvc_LINK_OUTPUT = /OUT:$@
|
||||||
|
|
||||||
release_msvc_OUTDIR = ./WinRel
|
release_msvc_OUTDIR = ./WinRel/
|
||||||
release_msvc_CPPFLAGS = /D NDEBUG
|
release_msvc_CPPFLAGS = /D NDEBUG
|
||||||
release_msvc_CFLAGS = /O2
|
release_msvc_CFLAGS = /O2
|
||||||
|
|
||||||
debug_msvc_OUTDIR = ./WinDebug
|
debug_msvc_OUTDIR = ./WinDebug/
|
||||||
debug_msvc_CPPFLAGS = /D _DEBUG
|
debug_msvc_CPPFLAGS = /D _DEBUG
|
||||||
debug_msvc_CFLAGS = /Zi /Od
|
debug_msvc_CFLAGS = /Zi /Od
|
||||||
debug_msvc_LDFLAGS = /DEBUG
|
debug_msvc_LDFLAGS = /DEBUG
|
||||||
|
@ -65,10 +65,10 @@ debug_msvc_LDFLAGS = /DEBUG
|
||||||
gcc_CC = gcc
|
gcc_CC = gcc
|
||||||
gcc_LD = $(gcc_CC)
|
gcc_LD = $(gcc_CC)
|
||||||
|
|
||||||
release_gcc_OUTDIR = ./GccRel
|
release_gcc_OUTDIR = ./GccRel/
|
||||||
debug_gcc_OUTDIR = ./GccDebug
|
debug_gcc_OUTDIR = ./GccDebug/
|
||||||
|
|
||||||
gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OBJDIR) -I$(SRCDIR) -I$(SRCDIR)/glob -I$(SRCDIR)/w32/include
|
gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(SRCDIR)/glob -I$(SRCDIR)/src/w32/include
|
||||||
gcc_CFLAGS = -mthreads -Wall -std=gnu99 -gdwarf-2 -g3
|
gcc_CFLAGS = -mthreads -Wall -std=gnu99 -gdwarf-2 -g3
|
||||||
gcc_LDFLAGS = -mthreads -gdwarf-2 -g3
|
gcc_LDFLAGS = -mthreads -gdwarf-2 -g3
|
||||||
gcc_LDLIBS = $(addprefix -l,$(w32_libs))
|
gcc_LDLIBS = $(addprefix -l,$(w32_libs))
|
||||||
|
@ -86,8 +86,14 @@ LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) $(LINK_
|
||||||
|
|
||||||
CHECK.cmd = cmd /c cd tests \& .\run_make_tests.bat -make ../$(PROG)
|
CHECK.cmd = cmd /c cd tests \& .\run_make_tests.bat -make ../$(PROG)
|
||||||
|
|
||||||
MKDIR.cmd = cmd /c mkdir $(subst /,\\,$@)
|
MKDIR = cmd /c mkdir
|
||||||
RM.cmd = cmd /c del /F /Q $(subst /,\\,$(OBJECTS) $(PROG))
|
MKDIR.cmd = $(MKDIR) $(subst /,\\,$@)
|
||||||
|
|
||||||
|
RM = cmd /c del /F /Q
|
||||||
|
RM.cmd = $(RM) $(subst /,\\,$(OBJECTS) $(PROG))
|
||||||
|
|
||||||
|
CP = cmd /c copy /Y
|
||||||
|
CP.cmd = $(CP) $(subst /,\\,$< $@)
|
||||||
|
|
||||||
CC = $($(TOOLCHAIN)_CC)
|
CC = $($(TOOLCHAIN)_CC)
|
||||||
LD = $($(TOOLCHAIN)_LD)
|
LD = $($(TOOLCHAIN)_LD)
|
||||||
|
@ -104,7 +110,7 @@ EXEEXT = .exe
|
||||||
_CUSTOM = $($(TOOLCHAIN)_$1) $($(TARGET_TYPE)_$1) $($(TARGET_TYPE)_$(TOOLCHAIN)_$1)
|
_CUSTOM = $($(TOOLCHAIN)_$1) $($(TARGET_TYPE)_$1) $($(TARGET_TYPE)_$(TOOLCHAIN)_$1)
|
||||||
|
|
||||||
# I'm not sure why this builds gnumake rather than make...?
|
# I'm not sure why this builds gnumake rather than make...?
|
||||||
PROG = $(OUTDIR)/gnumake$(EXEEXT)
|
PROG = $(OUTDIR)gnumake$(EXEEXT)
|
||||||
BASE_PROG = $(basename $(PROG))
|
BASE_PROG = $(basename $(PROG))
|
||||||
|
|
||||||
extra_CPPFLAGS = $(call _CUSTOM,CPPFLAGS)
|
extra_CPPFLAGS = $(call _CUSTOM,CPPFLAGS)
|
||||||
|
@ -112,5 +118,5 @@ extra_CFLAGS = $(call _CUSTOM,CFLAGS)
|
||||||
extra_LDFLAGS = $(call _CUSTOM,LDFLAGS)
|
extra_LDFLAGS = $(call _CUSTOM,LDFLAGS)
|
||||||
LDLIBS = $(call _CUSTOM,LDLIBS)
|
LDLIBS = $(call _CUSTOM,LDLIBS)
|
||||||
|
|
||||||
$(OUTDIR)/config.h: $(SRCDIR)/config.h.W32
|
$(OUTDIR)src/config.h: $(SRCDIR)/src/config.h.W32
|
||||||
cmd /c copy /Y $(subst /,\\,$< $@)
|
$(CP.cmd)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# GNU -*-Makefile-*- to build GNU make on MS-DOS with DJGPP
|
# GNU -*-Makefile-*- to build GNU make on MS-DOS with DJGPP
|
||||||
#
|
#
|
||||||
# MS-DOS overrides for use with Makebase.mk.
|
# MS-DOS overrides for use with Basic.mk.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017 Free Software Foundation, Inc.
|
# Copyright (C) 2017 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
|
@ -23,12 +23,22 @@ EXEEXT = .exe
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
prog_SOURCES += getloadavg.c $(glob_SOURCES)
|
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES)
|
||||||
|
|
||||||
extra_CPPFLAGS += -I$(SRCDIR)/glob -DINCLUDEDIR=\"c:/djgpp/include\" -DLIBDIR=\"c:/djgpp/lib\"
|
INCLUDEDIR = c:/djgpp/include
|
||||||
|
LIBDIR = c:/djgpp/lib
|
||||||
|
LOCALEDIR = c:/djgpp/share
|
||||||
|
|
||||||
MKDIR.cmd = command.com /c mkdir $(subst /,\\,$@)
|
extra_CPPFLAGS = -I$(SRCDIR)/glob
|
||||||
RM.cmd = command.com /c del /F /Q $(subst /,\\,$(OBJECTS) $(PROG))
|
|
||||||
|
|
||||||
$(OUTDIR)/config.h: $(SRCDIR)/configh.dos
|
MKDIR = command.com /c mkdir
|
||||||
command.com /c copy /Y $(subst /,\\,$< $@)
|
MKDIR.cmd = $(MKDIR) $(subst /,\\,$@)
|
||||||
|
|
||||||
|
RM = command.com /c del /F /Q
|
||||||
|
RM.cmd = $(RM) $(subst /,\\,$(OBJECTS) $(PROG))
|
||||||
|
|
||||||
|
CP = command.com /c copy /Y
|
||||||
|
CP.cmd = $(CP) $(subst /,\\,$< $@)
|
||||||
|
|
||||||
|
$(OUTDIR)src/config.h: $(SRCDIR)/src/configh.dos
|
||||||
|
$(CP.cmd)
|
||||||
|
|
|
@ -15,33 +15,33 @@
|
||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
ar.c
|
src/ar.c
|
||||||
arscan.c
|
src/arscan.c
|
||||||
commands.c
|
src/commands.c
|
||||||
dir.c
|
src/dir.c
|
||||||
expand.c
|
src/expand.c
|
||||||
file.c
|
src/file.c
|
||||||
function.c
|
src/function.c
|
||||||
getopt.c
|
src/getopt.c
|
||||||
guile.c
|
src/guile.c
|
||||||
hash.c
|
src/hash.c
|
||||||
implicit.c
|
src/implicit.c
|
||||||
job.c
|
src/job.c
|
||||||
load.c
|
src/load.c
|
||||||
main.c
|
src/main.c
|
||||||
misc.c
|
src/misc.c
|
||||||
output.c
|
src/output.c
|
||||||
output.h
|
src/output.h
|
||||||
posixos.c
|
src/posixos.c
|
||||||
read.c
|
src/read.c
|
||||||
remake.c
|
src/remake.c
|
||||||
remote-cstms.c
|
src/remote-cstms.c
|
||||||
rule.c
|
src/rule.c
|
||||||
signame.c
|
src/signame.c
|
||||||
strcache.c
|
src/strcache.c
|
||||||
variable.c
|
src/variable.c
|
||||||
variable.h
|
src/variable.h
|
||||||
vmsfunctions.c
|
src/vmsfunctions.c
|
||||||
vmsjobs.c
|
src/vmsjobs.c
|
||||||
vpath.c
|
src/vpath.c
|
||||||
w32/w32os.c
|
src/w32/w32os.c
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
@echo off
|
|
||||||
@echo Windows32 SCM build preparation of config.h.W32 and NMakefile.
|
|
||||||
if not exist config.h.W32 copy config.h.W32.template config.h.W32
|
|
||||||
if not exist config.h copy config.h.W32 config.h
|
|
||||||
if not exist NMakefile copy NMakefile.template NMakefile
|
|
||||||
@echo Preparation complete. Run build_w32.bat to compile and link.
|
|
|
@ -96,7 +96,7 @@ sub valid_option
|
||||||
|
|
||||||
if ($option =~ /^-srcdir$/i) {
|
if ($option =~ /^-srcdir$/i) {
|
||||||
$srcdir = shift @argv;
|
$srcdir = shift @argv;
|
||||||
if (! -f "$srcdir/gnumake.h") {
|
if (! -f "$srcdir/src/gnumake.h") {
|
||||||
print "$option $srcdir: Not a valid GNU make source directory.\n";
|
print "$option $srcdir: Not a valid GNU make source directory.\n";
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ sub set_more_defaults
|
||||||
if (! $srcdir) {
|
if (! $srcdir) {
|
||||||
$make_path =~ /^(.*$pathsep)?/;
|
$make_path =~ /^(.*$pathsep)?/;
|
||||||
my $d = $1 || '../';
|
my $d = $1 || '../';
|
||||||
-f "${d}gnumake.h" and $srcdir = $d;
|
-f "${d}/src/gnumake.h" and $srcdir = $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Not with the make program, so see if we can get it out of the makefile
|
# Not with the make program, so see if we can get it out of the makefile
|
||||||
|
@ -466,7 +466,7 @@ sub set_more_defaults
|
||||||
$_ = <MF>;
|
$_ = <MF>;
|
||||||
close(MF);
|
close(MF);
|
||||||
/^abs_srcdir\s*=\s*(.*?)\s*$/m;
|
/^abs_srcdir\s*=\s*(.*?)\s*$/m;
|
||||||
-f "$1/gnumake.h" and $srcdir = $1;
|
-f "$1/src/gnumake.h" and $srcdir = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get Purify log info--if any.
|
# Get Purify log info--if any.
|
||||||
|
|
|
@ -46,7 +46,7 @@ close($F) or die "close: testload.c: $!\n";
|
||||||
|
|
||||||
# Make sure we can compile
|
# 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 testload.so testload.c";
|
my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testload.so testload.c";
|
||||||
|
|
||||||
my $clog = `$sobuild 2>&1`;
|
my $clog = `$sobuild 2>&1`;
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ close($F) or die "close: testapi.c: $!\n";
|
||||||
|
|
||||||
# Make sure we can compile
|
# 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 $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testapi.so testapi.c";
|
||||||
|
|
||||||
my $clog = `$sobuild 2>&1`;
|
my $clog = `$sobuild 2>&1`;
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
|
|
Loading…
Reference in a new issue