From be3fb0ae6d6870dbc1b4d03447afcf3b0fed3114 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 27 Aug 1997 20:30:54 +0000 Subject: Updates for GNU make 3.75.92. --- AUTHORS | 2 +- ChangeLog | 88 ++++++++++ GNUmakefile | 27 ++- Makefile.DOS.template | 467 +++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 73 +++++--- Makefile.ami | 5 - NMakefile.template | 12 +- README.Amiga | 2 +- README.DOS.template | 68 +++++-- README.template | 15 +- TODO.private | 51 ++++++ ar.c | 116 +----------- arscan.c | 205 ++++++++++++++++++++-- build.template | 2 +- build_w32.bat | 108 ++++++------ commands.c | 2 +- configure.bat | 85 +++------ configure.in | 2 +- dir.c | 7 +- file.c | 11 +- filedef.h | 13 +- function.c | 2 +- implicit.c | 2 +- job.c | 12 +- main.c | 4 +- maintMakefile | 22 ++- make.h | 8 +- make.texinfo | 8 +- makefile.com | 8 +- makefile.vms | 8 +- misc.c | 2 +- read.c | 11 +- readme.vms | 12 +- remake.c | 28 ++- variable.c | 2 +- vmsdir.h | 2 + vmsify.c | 3 +- vpath.c | 43 +++-- w32/compat/dirent.c | 2 +- w32/include/sub_proc.h | 7 - w32/subproc/NMakefile | 4 +- w32/subproc/build.bat | 12 +- w32/subproc/sub_proc.c | 65 +++++-- 43 files changed, 1206 insertions(+), 422 deletions(-) create mode 100644 Makefile.DOS.template create mode 100644 TODO.private diff --git a/AUTHORS b/AUTHORS index 225eb24..b66bb8f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ GNU Make porting efforts: Port to VMS by: Klaus Kaempf - + Archive support/Bug fixes by John W. Eaton Port to Amiga by: Aaron Digulla diff --git a/ChangeLog b/ChangeLog index 6bdd8ce..348779f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,91 @@ +Tue Aug 26 11:59:15 1997 Paul D. Smith + + * main.c (print_version): Add 97 to copyright years. + + * read.c (do_define): Check the length of the array before looking + at a particular offset. + + * job.c (construct_command_argv_internal): Examine the last byte + of the previous arg, not the byte after that. + +Sat Aug 23 1997 Eli Zaretskii + + * Makefile.DOS.template: New file (converted to Makefile.DOS in + the distribution). + + * configure.bat: Rewrite to use Makefile.DOS instead of editing + Makefile.in. Add support for building from outside of the source + directory. Fail if the environment block is too small. + + * configh.dos: Use . + + * README.DOS: Update instructions. + +Fri Aug 22 1997 Eli Zaretskii + + * job.c (start_job_command): [__MSDOS__] Don't test for "/bin/sh" + literally, use value of unixy_shell instead. + + * filedef.h (NEW_MTIME): Use 1 less than maximum possible value if + time_t is unsigned. + +Sat Aug 16 00:56:15 1997 John W. Eaton + + * vmsify.c (vmsify, case 11): After translating `..' elements, set + nstate to N_OPEN if there are still more elements to process. + (vmsify, case 2): After translating `foo/bar' up to the slash, + set nstate to N_OPEN, not N_DOT. + +Fri Aug 8 15:18:09 1997 John W. Eaton + + * dir.c (vmsstat_dir): Leave name unmodified on exit. + * make.h (PATH_SEPARATOR_CHAR): Set to comma for VMS. + * vpath.c: Fix comments to refer to path separator, not colon. + (selective_vpath_search): Avoid Unixy slash handling for VMS. + +Thu Aug 7 22:24:03 1997 John W. Eaton + + * ar.c: [VMS] Don't declare ar_member_touch. + Delete VMS version of ar_member_date. + Enable non-VMS versions of ar_member_date and ar_member_date_1 for + VMS too. + * arscan.c (VMS_get_member_info): New function. + (ar_scan): Provide version for VMS systems. + (ar_name_equal): Simply compare name and mem on VMS systems. + Don't define ar_member_pos or ar_member_touch on VMS systems. + + * config.h-vms (pid_t, uid_t): Don't define. + + * remake.c: Delete declaration of vms_stat. + (name_mtime): Don't call vms_stat. + (f_mtime): [VMS] Funky time value manipulation no longer necessary. + + * file.c (print_file): [VMS] Use ctime, not cvt_time. + + * make.h: [VMS] Don't define POSIX. + + * makefile.com (filelist): Include ar and arscan. + Also include them in the link commands. + Don't define NO_ARCHIVES in cc command. + + * makefile.vms (ARCHIVES, ARCHIVES_SRC): Uncomment. + (defines): Delete NO_ARCHIVES from list. + + * remake.c (f_mtime): Only check to see if intermediate file is + out of date if it also exists (i.e., mtime != (time_t) -1). + + * vmsdir.h (u_long, u_short): Skip typedefs if using DEC C. + +Fri Jun 20 23:02:07 1997 Rob Tulloh + + * w32/subproc/sub_proc.c: Get W32 sub_proc to handle shebang + (#!/bin/sh) in script files correctly. + Fixed a couple of memory leaks. + Fixed search order in find_file() (w32/subproc/sub_proc.c) so that + files with extensions are preferred over files without extensions. + Added search for files with .cmd extension too. + * w32/subproc/misc.c (arr2envblk): Fixed memory leak. + Mon Aug 18 09:41:08 1997 Paul D. Smith * Version 3.75.91 diff --git a/GNUmakefile b/GNUmakefile index 272e37b..aedde59 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,16 +5,34 @@ .SUFFIXES: +NORECURSE = true + +# If the user asked for a specific target, invoke the Mkaefile instead. +# .DEFAULT: - [ -f Makefile ] || ./configure + @[ -f Makefile.in -a -f configure -a -f aclocal.m4 -a -f config.h.in ] \ + || $(MAKE) __cfg NORECURSE= + @[ -f Makefile ] \ + || ./configure $(MAKE) -f Makefile $@ -.PHONY: __cfg __cfg_basic +.PHONY: __cfg __cfg_basic TAGS +# This is variable since the glob subdirectory doesn't use it. +# ACCONFIG = acconfig.h -__cfg: __cfg_basic config.h.in +__cfg: __cfg_basic config.h.in TAGS cd glob && $(MAKE) -f ../GNUmakefile __cfg_basic ACCONFIG= +ifdef NORECURSE + @echo ""; echo "Now you should run one of:"; echo ""; \ + echo " make all"; \ + echo " make dist"; \ + echo " make distdir"; \ + echo " make distcheck"; echo ""; \ + echo "Or similar to proceed.";\ + echo "" +endif __cfg_basic: aclocal.m4 stamp-h.in configure Makefile.in @@ -31,3 +49,6 @@ configure: configure.in aclocal.m4 Makefile.in: configure.in config.h.in Makefile.am aclocal.m4 automake --add-missing + +TAGS: + find . -name '*.[ch]' -print | etags - diff --git a/Makefile.DOS.template b/Makefile.DOS.template new file mode 100644 index 0000000..e2f8135 --- /dev/null +++ b/Makefile.DOS.template @@ -0,0 +1,467 @@ +# -*-Makefile-*- template for DJGPP +# Makefile.in generated automatically by automake 1.2 from Makefile.am + +# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# This Makefile.DOS is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# -*-Makefile-*-, or close enough + + +SHELL = /bin/sh + +srcdir = . +VPATH = $(srcdir) +# $DJDIR is defined automatically by DJGPP to point +# to the root of the DJGPP installation tree. +prefix = ${DJDIR} +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +datadir = ${prefix}/share +libdir = ${prefix}/lib +infodir = ${prefix}/info +# DJGPP doesn't have separate man tree, use info instead. +mandir = ${prefix}/info +includedir = ${prefix}/include +oldincludedir = c:/djgpp/include + +pkgdatadir = $(datadir)/make +pkglibdir = $(libdir)/make +pkgincludedir = $(includedir)/make + +INSTALL = ${bindir}/ginstall -c +INSTALL_PROGRAM = ${bindir}/ginstall -c +INSTALL_DATA = ${bindir}/ginstall -c -m 644 +INSTALL_SCRIPT = ${bindir}/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 = true +PRE_INSTALL = true +POST_INSTALL = true +NORMAL_UNINSTALL = true +PRE_UNINSTALL = true +POST_UNINSTALL = true +AR = ar +CC = gcc +CPP = gcc -E +LIBOBJS = +MAKEINFO = ${bindir}/makeinfo +PACKAGE = make +RANLIB = ranlib +REMOTE = stub +VERSION = %VERSION% + +AUTOMAKE_OPTIONS = 1.2 + +bin_PROGRAMS = %PROGRAMS% + +make_SOURCES = %SOURCES% +# This should include the glob/ prefix +libglob_a_SOURCES = %GLOB_SOURCES% +make_LDADD = glob/libglob.a + +info_TEXINFOS = make.texinfo + +INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"c:/djgpp/lib\" -DINCLUDEDIR=\"c:/djgpp/include\" + +BUILT_SOURCES = README build.sh.in + +EXTRA_DIST = make.man $(BUILT_SOURCES) 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 + +SUBDIRS = glob +mkinstalldirs = ${bindir}/gmkdir -p +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = build.sh +PROGRAMS = $(bin_PROGRAMS) + + +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)/texinfo.tex +INFO_DEPS = make.info +DVIS = make.dvi +TEXINFOS = make.texinfo +DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh.in config.h.in configure configure.in getloadavg.c install-sh missing mkinstalldirs stamp-h.in texinfo.tex + + +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 .ps .texi .texinfo + +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) $(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do if test -f $$p; then echo " $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | sed '$(transform)'`"; $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | sed '$(transform)'`; else :; fi; done + +uninstall-binPROGRAMS: + $(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do rm -f $(bindir)/`echo $$p|sed '$(transform)'`; done + +.c.o: + $(COMPILE) -c $< + +clean-noinstLIBRARIES: + test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +mostlyclean-compile: + rm -f *.o *.exe make.new core + +clean-compile: + +distclean-compile: + rm -f *.tab.c + +maintainer-clean-compile: + +make: $(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) + +make.info: make.texinfo +make.dvi: make.texinfo + + +DVIPS = dvips + +.texi.info: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + +.texi.dvi: + TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.texi: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + +.texinfo.info: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + +.texinfo: + $(MAKEINFO) $(srcdir)/$< -o ./$@ + +.texinfo.dvi: + TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.dvi.ps: + $(DVIPS) $< -o $@ + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(infodir) + @for file in $(INFO_DEPS) make.i; do d=$(srcdir); for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9] $$file[0-9] $$file[0-9][0-9]`; do if test -f $$d/$$ifile; then echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; 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 echo " install-info --info-dir=$(infodir) $(infodir)/$$file"; install-info --info-dir=$(infodir) $(infodir)/$$file || :; 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=$(infodir) --remove $$file; done + $(NORMAL_UNINSTALL) + for file in $(INFO_DEPS) make.i; do (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9] $$file[0-9] $$file[0-9][0-9]); 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 make.aux make.cp make.cps make.dvi make.fn make.fns make.ky make.log make.pg make.toc make.tp make.tps make.vr make.vrs make.op make.tr make.cv + +clean-aminfo: + +distclean-aminfo: + +maintainer-clean-aminfo: + for i in $(INFO_DEPS) make.i; do rm -f `eval echo $$i*`; done + +# 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 ($(words $(SUBDIRS)), 1) + @command.com /c if not exist glob\\nul md glob + @echo Making all in $(SUBDIRS) + $(MAKE) -C $(SUBDIRS) -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a +else + @echo FATAL: There is more than one directory in "($(SUBDIRS))" + @$(EXIT_FAIL) +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: +ifeq ($(words $(SUBDIRS)), 1) + @echo Making $(shell echo $@ | sed s/-recursive//) in $(SUBDIRS) + $(MAKE) -C $(SUBDIRS) -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am +else + @echo FATAL: There is more than one directory in "($(SUBDIRS))" + @$(EXIT_FAIL) +endif + +tags-in-glob: $(libglob_a_SOURCES) + etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS + +tags-recursive: +ifeq ($(words $(SUBDIRS)), 1) + $(MAKE) tags-in-glob +else + @echo FATAL: There is more than one 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 +alloca.o alloca.lo: alloca.c config.h +ar.o ar.lo: ar.c make.h config.h filedef.h dep.h glob/fnmatch.h +arscan.o arscan.lo: arscan.c make.h config.h +commands.o commands.lo: commands.c make.h config.h dep.h filedef.h variable.h job.h commands.h +default.o default.lo: default.c make.h config.h rule.h dep.h filedef.h job.h commands.h variable.h +dir.o dir.lo: dir.c make.h config.h glob/glob.h +expand.o expand.lo: expand.c make.h config.h filedef.h job.h commands.h variable.h +file.o file.lo: file.c make.h config.h dep.h filedef.h job.h commands.h variable.h +function.o function.lo: function.c make.h config.h filedef.h variable.h dep.h job.h commands.h +getloadavg.o getloadavg.lo: getloadavg.c config.h +getopt.o getopt.lo: getopt.c config.h getopt.h +getopt1.o getopt1.lo: getopt1.c config.h getopt.h +implicit.o implicit.lo: implicit.c make.h config.h rule.h dep.h filedef.h +job.o job.lo: job.c make.h config.h job.h filedef.h commands.h variable.h +main.o main.lo: main.c make.h config.h dep.h filedef.h variable.h job.h commands.h getopt.h +misc.o misc.lo: misc.c make.h config.h dep.h +read.o read.lo: read.c make.h config.h dep.h filedef.h job.h commands.h variable.h glob/glob.h +remake.o remake.lo: remake.c make.h config.h filedef.h job.h commands.h dep.h +remote-stub.o remote-stub.lo: remote-stub.c make.h config.h filedef.h job.h commands.h +rule.o rule.lo: rule.c make.h config.h dep.h filedef.h job.h commands.h variable.h rule.h +signame.o signame.lo: signame.c config.h signame.h +variable.o variable.lo: variable.c make.h config.h dep.h filedef.h job.h commands.h variable.h +version.o version.lo: version.c config.h +vpath.o vpath.lo: vpath.c make.h config.h filedef.h variable.h +fnmatch.o fnmatch.lo: fnmatch.c fnmatch.h ../config.h +glob.o glob.lo: glob.c fnmatch.h glob.h ../config.h + +info: $(INFO_DEPS) info-recursive +dvi: $(DVIS) dvi-recursive +check: all-am + $(MAKE) check-recursive check-local +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) all-recursive + +all-am: Makefile $(INFO_DEPS) $(PROGRAMS) config.h + +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: 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 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 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 + + +# --------------- Local DIST Section + +# Install the w32 subdirectory +# +dist-hook: + (cd $(srcdir); \ + w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \ + tar chf - $$w32) \ + | (cd $(distdir); tar xfBp -) + +# --------------- Local CHECK Section + +check-local: check-loadavg check-regression +.PHONY: check-loadavg check-regression + +# > 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: + here=`pwd`; testdir=""; \ + case "$(MAKE_TEST)" in "") \ + for d1 in $$here $(srcdir); do \ + for d2 in ../.. .. .; do \ + all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \ + case "$$all" in \ + "$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \ + *) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\ + testdir=`dirname $$try` ;; esac; \ + done; done ;; \ + *) testdir="$(MAKE_TEST)" ;; \ + esac; \ + case "$$testdir" in \ + "") echo "Couldn't find make-test-* test suite."; exit 0;; \ + esac; \ + echo "cd $$testdir && ./run_make_tests -make_path $$here/make"; \ + cd $$testdir && ./run_make_tests -make_path $$here/make + +# --------------- 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: diff --git a/Makefile.am b/Makefile.am index 17e2acd..3a8451e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,26 +18,64 @@ INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\ BUILT_SOURCES = README build.sh.in -EXTRA_DIST = make.man $(BUILT_SOURCES) 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 +EXTRA_DIST = make.man $(BUILT_SOURCES) remote-cstms.c\ + make-stds.texi texinfo.tex 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\ + readme.vms makefile.vms makefile.com config.h-vms vmsdir.h\ + vmsfunctions.c vmsify.c SUBDIRS = glob -# Look for the make test suite, and run it if found. Look in MAKE_TEST, or -# in the srcdir or the distdir, their parents, and their parents. +# --------------- Local DIST Section + +# Install the w32 subdirectory +# +dist-hook: + (cd $(srcdir); \ + w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \ + tar chf - $$w32) \ + | (cd $(distdir); tar xfBp -) + + +# --------------- Local CHECK Section + +check-local: check-loadavg check-regression +.PHONY: check-loadavg check-regression + +# > check-loadavg # -check-local: - @here=`pwd`; testdir=""; \ +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: + here=`pwd`; testdir=""; \ case "$(MAKE_TEST)" in "") \ for d1 in $$here $(srcdir); do \ for d2 in ../.. .. .; do \ - try=`ls -1 $$d1/$$d2/make-test-*/run_make_tests 2>/dev/null | tail -1`; \ - case "$$try" in "") : ;; *) testdir=`dirname $$try` ;; esac; \ + all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \ + case "$$all" in \ + "$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \ + *) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\ + testdir=`dirname $$try` ;; esac; \ done; done ;; \ *) testdir="$(MAKE_TEST)" ;; \ esac; \ @@ -47,13 +85,8 @@ check-local: echo "cd $$testdir && ./run_make_tests -make_path $$here/make"; \ cd $$testdir && ./run_make_tests -make_path $$here/make -# Install the w32 subdirectory -# -dist-hook: - (cd $(srcdir); \ - w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \ - tar chf - $$w32) \ - | (cd $(distdir); tar xfBp -) + +# --------------- Maintainer's Section if MAINT_MAKEFILE # Note this requires GNU make. Not to worry, since it will only be included diff --git a/Makefile.ami b/Makefile.ami index e6bedf7..e24da74 100644 --- a/Makefile.ami +++ b/Makefile.ami @@ -22,11 +22,6 @@ # Makefile for GNU Make # -# Ultrix 2.2 make doesn't expand the value of VPATH. -VPATH = /make-3.74/ -# This must repeat the value, because configure will remove `VPATH = .'. -srcdir = /make-3.74/ - CC = sc RM = delete diff --git a/NMakefile.template b/NMakefile.template index 49e4fed..d82dbce 100644 --- a/NMakefile.template +++ b/NMakefile.template @@ -1,7 +1,7 @@ # NOTE: If you have no `make' program at all to process this makefile, run # `build_w32.bat' instead. # -# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify @@ -29,9 +29,9 @@ OUTDIR=. MAKEFILE=NMakefile SUBPROC_MAKEFILE=NMakefile -CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES +CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES CFLAGS_debug = $(CFLAGS_any) /Od /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/ +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\ /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \ @@ -55,13 +55,15 @@ w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: config.h: config.h.W32 copy $? $@ -Release: +Release: nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe -Debug: +Debug: nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe clean: rmdir /s /q WinDebug WinRel + rmdir /s /q w32\subproc\WinDebug w32\subproc\WinRel + erase config.h $(OUTDIR): if not exist .\$@\nul mkdir .\$@ diff --git a/README.Amiga b/README.Amiga index e8eca68..6f08dd8 100644 --- a/README.Amiga +++ b/README.Amiga @@ -3,7 +3,7 @@ Author: GNU, Amiga port by Aaron "Optimizer" Digulla Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de) Type: dev/c -This is a pure Amiga port of GNU make 3.74. It needs no extra libraries or +This is a pure Amiga port of GNU make. It needs no extra libraries or anything. It has the following features (in addition to any features of GNU make): diff --git a/README.DOS.template b/README.DOS.template index 6226f7b..065c239 100644 --- a/README.DOS.template +++ b/README.DOS.template @@ -26,6 +26,10 @@ 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.) + To build: @@ -35,30 +39,61 @@ To build: 2. Invoke the `configure.bat' batch file. - If it 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). + 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: - 3. If you have Make, the configure script will need a Unix-style - Sed program. If you don't have that installed, you can find one - on one of the DJGPP mirror sites. + configure.bat c:/djgpp/gnu/make-3.76 + + Note the forward slashes: you MUST use them here. + + 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. If you will need to run Make on machines without an FPU, you might consider building a version of Make which doesn't issue floating-point instructions (they don't help much on MSDOS - anyway). To this end, invoke the configure batch file like so: - - configure no-float + anyway). To this end, edit the Makefile created by + configure.bat and add -DNO_FLOAT to the value of CPPFLAGS. 5. Invoke Make. - 6. If you have a Unix-style shell installed, you can use the - `install' target. You will also need GNU Fileutils and GNU - Sh-utils for this (they should be available from the DJGPP - sites). + 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-3.76 + + (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. + + 6. 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 Sh-utils for this (they + should be available from the DJGPP sites). + + 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: + + * GNU 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.) - 7. The `clean' targets require Unix-style `rm' program. + 7. The `clean' targets also require Unix-style shell and `test' and + `rm' programs (from Fileutils and Sh-utils, accordingly). @@ -67,7 +102,8 @@ Notes: 1. The shell issue. - This is probably the most significant improvement in this port. + This is probably the most significant improvement, first + introduced in the port of GNU Make 3.75. The original behavior of GNU Make is to invoke commands directly, as long as they don't include characters special to diff --git a/README.template b/README.template index 735815c..257edde 100644 --- a/README.template +++ b/README.template @@ -14,11 +14,16 @@ Some systems' Make programs are broken and cannot process the Makefile for GNU Make. If you get errors from your system's Make when building GNU Make, try using `build.sh' instead. -See README.W32 for details about GNU Make on Windows NT or 95. -See README.Amiga for details about GNU Make on AmigaDOS. -A precompiled binary of the MSDOS port of GNU Make is available as part -of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more -information. + - See README.W32 for details about GNU Make on Windows NT or 95. + + - See README.Amiga for details about GNU Make on AmigaDOS. + + - See README.DOS for compilation instructions on MS-DOS and MS-Windows + using DJGPP tools. + + A precompiled binary of the MSDOS port of GNU Make is available as part + of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more + information. It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such that if you compile make with `cc -O' on AIX 3.2, it will not work correctly. diff --git a/TODO.private b/TODO.private new file mode 100644 index 0000000..21f79e2 --- /dev/null +++ b/TODO.private @@ -0,0 +1,51 @@ + -*-Indented-Text-*- +GNU Make TODO List +------------------ + +This list comes both from the authors and from users of GNU make. + +They are listed in no particular order! + +Also, I don't gaurantee that all of them will be ultimately deemed "good +ideas" and implemented. These are just the ones that, at first blush, +seem to have some merit (and that I can remember). + +However, if you see something here you really, really want, speak up. +All other things being equal, I will tend to implement things that seem +to maximize user satisfaction. + +Also, this list doesn't include things which I'm pretty sure would +require serious, fundamental change to GNU make; those things belong on +the mythical "Make 4.0" list. I admit, that line can be somewhat fuzzy :) + + + * Per-target variable definitions (a la SunOS make's ":=" feature, but + note the syntax here will definitely be different!) + + * Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o, etc.) + + * More robust clock skew detection algorithm. + + * Provide MAKETARGETS and MAKEVARIABLES variables, containing the + names of the targets and variables defined in the makefile. + + * If the user asks for parallelization, rebuild any "include"'d files + in parallel as well (helps esp. when there are many .d files to be + built). + + * Allow variables/functions to expand to other make rules which are + then interpreted, with newlines handled correctly. + + * More intelligent submake handling when doing parallel makes: + currently each submake gets a "-j 1" option. It would be good if + make was smart enough to give some/all its slots to the submake + (esp. if there is no other rule that can be run by the parent in + parallel, a common situation). Doing this perfectly might be too + hard, but something less than perfect is certainly possible. + + * Option to check more than timestamps to determine if targets have + changed (MD5 checksumming?) + + * Some sort of operating-system independent way of handling paths + would be outstanding, so makefiles can be written for UNIX, VMS, + DOS, MS-Windows, Amiga, etc. with a minimum of specialization. diff --git a/ar.c b/ar.c index 117e11b..7167dc3 100644 --- a/ar.c +++ b/ar.c @@ -1,5 +1,5 @@ /* Interface to `ar' archives for GNU Make. -Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -26,9 +26,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Defined in arscan.c. */ extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg)); -extern int ar_member_touch PARAMS ((char *arname, char *memname)); extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated)); - +#ifndef VMS +extern int ar_member_touch PARAMS ((char *arname, char *memname)); +#endif /* Return nonzero if NAME is an archive-member reference, zero if not. An archive-member reference is a name like `lib(member)'. @@ -40,7 +41,7 @@ ar_name (name) char *name; { char *p = index (name, '('), *end = name + strlen (name) - 1; - + if (p == 0 || p == name || *end != ')') return 0; @@ -66,111 +67,7 @@ ar_parse_name (name, arname_p, memname_p) if (memname_p != 0) *memname_p = savestring (p + 1, end - (p + 1)); -} - -#ifdef VMS -#include -#include -#include -#include -#include -#if __DECC -#include -#endif - -#define uppercasify(str) {char *str1; for (str1 = str; *str1; str1++) *str1 = _toupper(*str1);} - -#define LBR$_KEYNOTFND 2527330 /* This isn't in any .h file anywhere so I got it from a MACRO library */ - -time_t -ar_member_date (name) - char *name; -{ - static char *arname; - static char *memname; - char *p,*q; - long int val; - static struct { - struct mhddef mhd; - struct credef cre; - char garbage[256]; - } buf; - int func=LBR$C_READ, - type=LBR$C_TYP_OBJ, - rfa[2], - lidx, - status; - $DESCRIPTOR(bufdesc,(char *)&buf); - $DESCRIPTOR(libdesc,arname); - $DESCRIPTOR(moddesc,memname); - - /* This "file" is an archive member. */ - p = index (name, '('); - arname = savestring (name, p - name); - val = strlen (p) - 2; -/* - if (val > 15) - val = 15; -*/ - memname = savestring (p + 1, val); -#ifdef OLDWAY - p = rindex (memname, ')'); - if (p != 0) { - q = rindex(p,'.'); - if (q) - *q = '\0'; /* to get rid of extension */ - } -#endif - - q = rindex(memname,'.'); - if (q) - *q = '\0'; /* to get rid of extension */ - - uppercasify(memname); - - /* Make sure we know the modtime of the archive itself because - we are likely to be called just before commands to remake a - member are run, and they will change the archive itself. */ - (void) f_mtime (enter_file (arname)); - - libdesc.dsc$a_pointer = arname; - libdesc.dsc$w_length = strlen(arname); - moddesc.dsc$a_pointer = memname; - moddesc.dsc$w_length = strlen(memname); - - if (!((status = lbr$ini_control(&lidx,&func,&type,0)) & 1)) { - printf("Error in lbr$ini_control, %d\n",status); - return(-1); - } - - if (!((status = lbr$open(&lidx,&libdesc,0,0,0,0,0)) & 1)) { - printf("Error opening library %s to lookup member %s, %d\n",arname, memname ,status); - return(-1); - } - - if (!((status = lbr$lookup_key(&lidx,&moddesc,rfa)) & 1)) { - if (status != LBR$_KEYNOTFND) - printf("Error looking up module %s in library %s, %d\n",memname, arname ,status); - lbr$close(&lidx); - return(-1); - } - - if (!((status = lbr$set_module(&lidx,rfa,&bufdesc,&bufdesc,0)) & 1)) { - printf("Error getting module info, %d\n",status); - lbr$close(&lidx); - return(-1); - } - - lbr$close(&lidx); - - val = SHELL$FIX_TIME(&buf.mhd.mhd$l_datim); - - free (arname); - free (memname); - return (val <= 0 ? (time_t) -1 : (time_t) val); } - -#else static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, long int hdrpos, long int datapos, long int size, long int date, int uid, int gid, int mode, char *name)); @@ -232,13 +129,12 @@ ar_member_date_1 (desc, mem, truncated, { return ar_name_equal (name, mem, truncated) ? date : 0; } -#endif /* !VMS */ /* Set the archive-member NAME's modtime to now. */ #ifdef VMS int -ar_touch (name) +ar_touch (name) char *name; { error ("touch archive member is not available on VMS"); diff --git a/arscan.c b/arscan.c index e63659e..9cf746b 100644 --- a/arscan.c +++ b/arscan.c @@ -1,19 +1,19 @@ /* Library function for scanning an archive file. - Copyright (C) 1987, 89, 91, 92, 93, 94, 95 Free Software Foundation, Inc. +Copyright (C) 1987,89,91,92,93,94,95,97 Free Software Foundation, Inc. - This program 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 2, or (at your option) - any later version. +This program 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 2, or (at your option) +any later version. - This program 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. +This program 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, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "make.h" @@ -25,6 +25,171 @@ #ifndef NO_ARCHIVES +#ifdef VMS +#include +#include +#include +#include +#include +#if __DECC +#include +#include +#endif + +#define uppercasify(str) {char *str1; for (str1 = str; *str1; str1++) *str1 = _toupper(*str1);} + +static void *VMS_lib_idx; + +static char *VMS_saved_memname; + +static time_t VMS_member_date; + +static long int (*VMS_function) (); + +static int +VMS_get_member_info (module, rfa) + struct dsc$descriptor_s *module; + unsigned long *rfa; +{ + int status, i; + long int fnval; + + time_t val; + + static struct dsc$descriptor_s bufdesc = + { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL }; + + struct mhddef *mhd; + char filename[128]; + + bufdesc.dsc$a_pointer = filename; + bufdesc.dsc$w_length = sizeof (filename); + + status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc, + &bufdesc.dsc$w_length, 0); + if (! status) + { + error ("lbr$set_module failed to extract module info, status = %d", + status); + + lbr$close (&VMS_lib_idx); + + return 0; + } + + mhd = (struct mhddef *) filename; + + val = decc$fix_time (&mhd->mhd$l_datim); + + for (i = 0; i < module->dsc$w_length; i++) + filename[i] = _tolower (module->dsc$a_pointer[i]); + + filename[i] = '\0'; + + VMS_member_date = (time_t) -1; + + fnval = + (*VMS_function) (-1, filename, 0, 0, 0, 0, val, 0, 0, 0, + VMS_saved_memname); + + if (fnval) + { + VMS_member_date = fnval; + return 0; + } + else + return 1; +} + +/* Takes three arguments ARCHIVE, FUNCTION and ARG. + + Open the archive named ARCHIVE, find its members one by one, + and for each one call FUNCTION with the following arguments: + archive file descriptor for reading the data, + member name, + member name might be truncated flag, + member header position in file, + member data position in file, + member data size, + member date, + member uid, + member gid, + member protection mode, + ARG. + + NOTE: on VMS systems, only name, date, and arg are meaningful! + + The descriptor is poised to read the data of the member + when FUNCTION is called. It does not matter how much + data FUNCTION reads. + + If FUNCTION returns nonzero, we immediately return + what FUNCTION returned. + + Returns -1 if archive does not exist, + Returns -2 if archive has invalid format. + Returns 0 if have scanned successfully. */ + +long int +ar_scan (archive, function, arg) + char *archive; + long int (*function) (); + long int arg; +{ + char *p; + + static struct dsc$descriptor_s libdesc = + { 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL }; + + unsigned long func = LBR$C_READ; + unsigned long type = LBR$C_TYP_UNK; + unsigned long index = 1; + + int status; + + status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0); + + if (! status) + { + error ("lbr$ini_control failed with status = %d",status); + return -2; + } + + libdesc.dsc$a_pointer = archive; + libdesc.dsc$w_length = strlen (archive); + + status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0); + + if (! status) + { + error ("unable to open library `%s' to lookup member `%s'", + archive, (char *)arg); + return -1; + } + + VMS_saved_memname = (char *)arg; + + /* For comparison, delete .obj from arg name. */ + + p = rindex (VMS_saved_memname, '.'); + if (p) + *p = '\0'; + + VMS_function = function; + + lbr$get_index (&VMS_lib_idx, &index, VMS_get_member_info, 0); + + /* Undo the damage. */ + if (p) + *p = '.'; + + lbr$close (&VMS_lib_idx); + + return VMS_member_date > 0 ? VMS_member_date : 0; +} + +#else /* !VMS */ + /* SCO Unix's compiler defines both of these. */ #ifdef M_UNIX #undef M_XENIX @@ -203,7 +368,7 @@ ar_scan (archive, function, arg) (void) close (desc); return -2; } - + name[name_len] = 0; sscanf (member_header.ar_date, "%12ld", &dateval); @@ -277,7 +442,7 @@ ar_scan (archive, function, arg) && name[2] == '/') { int namesize = atoi (name + 3); - + name = (char *) alloca (namesize + 1); nread = read (desc, name, namesize); if (nread != namesize) @@ -351,7 +516,7 @@ ar_scan (archive, function, arg) (void) close (desc); return -2; } - + /* The names are separated by newlines. Some formats have a trailing slash. Null terminate the strings for convenience. */ @@ -365,7 +530,7 @@ ar_scan (archive, function, arg) clear[-1] = '\0'; } } - + is_namemap = 0; } @@ -379,6 +544,7 @@ ar_scan (archive, function, arg) close (desc); return 0; } +#endif /* !VMS */ /* Return nonzero iff NAME matches MEM. If TRUNCATED is nonzero, MEM may be truncated to @@ -426,7 +592,7 @@ ar_name_equal (name, mem, truncated) } #else /* AIX or APOLLO. */ - +#ifndef VMS if (truncated) { #ifdef AIAMAG @@ -435,7 +601,7 @@ ar_name_equal (name, mem, truncated) #else struct ar_hdr hdr; return !strncmp (name, mem, - sizeof (hdr.ar_name) - + sizeof (hdr.ar_name) - #if !defined (__hpux) && !defined (cray) 1 #else @@ -444,12 +610,14 @@ ar_name_equal (name, mem, truncated) ); #endif } +#endif /* !VMS */ return !strcmp (name, mem); #endif } +#ifndef VMS /* ARGSUSED */ static long int ar_member_pos (desc, mem, truncated, @@ -532,6 +700,7 @@ ar_member_touch (arname, memname) errno = i; return -3; } +#endif #ifdef TEST diff --git a/build.template b/build.template index 40307ff..0cb0216 100644 --- a/build.template +++ b/build.template @@ -2,7 +2,7 @@ # Shell script to build GNU Make in the absence of any `make' program. # @configure_input@ -# Copyright (C) 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify diff --git a/build_w32.bat b/build_w32.bat index f164f64..49e91d4 100644 --- a/build_w32.bat +++ b/build_w32.bat @@ -10,59 +10,59 @@ echo off echo "Creating GNU make for Windows 95/NT" echo on if not exist .\WinDebug\nul mkdir .\WinDebug -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c echo WinDebug\variable.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c echo WinDebug\rule.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c echo WinDebug\remote-stub.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c echo WinDebug\commands.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c echo WinDebug\file.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c echo WinDebug\getloadavg.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c echo WinDebug\default.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c echo WinDebug\signame.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c echo WinDebug\expand.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c echo WinDebug\dir.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c echo WinDebug\main.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c echo WinDebug\getopt1.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c echo WinDebug\job.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c echo WinDebug\read.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c echo WinDebug\version.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c echo WinDebug\getopt.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c echo WinDebug\arscan.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c echo WinDebug\remake.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c echo WinDebug\misc.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c echo WinDebug\ar.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c echo WinDebug\function.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c echo WinDebug\vpath.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c echo WinDebug\implicit.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c echo WinDebug\dirent.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c echo WinDebug\glob.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c echo WinDebug\fnmatch.obj >>link.dbg -cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c +cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c echo WinDebug\pathstuff.obj >>link.dbg echo off echo "Linking WinDebug/%make%.exe" @@ -73,59 +73,59 @@ if not exist .\WinDebug/%make%.exe echo "WinDebug build failed" if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!" if not exist .\WinRel\nul mkdir .\WinRel echo on -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c echo WinRel\variable.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c echo WinRel\rule.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c echo WinRel\remote-stub.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c echo WinRel\commands.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c echo WinRel\file.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c echo WinRel\getloadavg.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c echo WinRel\default.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c echo WinRel\signame.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c echo WinRel\expand.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c echo WinRel\dir.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c echo WinRel\main.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c echo WinRel\getopt1.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c echo WinRel\job.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c echo WinRel\read.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c echo WinRel\version.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c echo WinRel\getopt.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c echo WinRel\arscan.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c echo WinRel\remake.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c echo WinRel\misc.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c echo WinRel\ar.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c echo WinRel\function.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c echo WinRel\vpath.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c echo WinRel\implicit.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c echo WinRel\dirent.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c echo WinRel\glob.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c echo WinRel\fnmatch.obj >>link.rel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c echo WinRel\pathstuff.obj >>link.rel echo off echo "Linking WinRel/%make%.exe" diff --git a/commands.c b/commands.c index 81d1a68..5646b18 100644 --- a/commands.c +++ b/commands.c @@ -1,5 +1,5 @@ /* Command processing for GNU Make. -Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff --git a/configure.bat b/configure.bat index a376aca..a357923 100644 --- a/configure.bat +++ b/configure.bat @@ -1,8 +1,21 @@ @echo off echo Configuring MAKE for DJGPP -rem This batch file assumes a unix-type "sed" program -update configh.dos config.h +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 @@ -15,69 +28,17 @@ if exist junk.$$$ del junk.$$$ echo No Make program found--use DOSBUILD.BAT to build Make. goto End -rem They do have Make. Generate Makefiles. +rem They do have Make. Generate the Makefile. :MakeOk del junk.$$$ -echo # Makefile generated for DJGPP by "configure.bat"> Makefile - -if exist config.sed del config.sed - -echo ": try_sl ">> config.sed -echo "/\\$/ { ">> config.sed -echo " N ">> config.sed -echo " s/[ ]*\\\n[ ]*/ / ">> config.sed -echo " b try_sl ">> config.sed -echo "} ">> config.sed - -echo "s/@srcdir@/./ ">> config.sed -echo "s/@exec_prefix@/$(DJDIR)/ ">> config.sed -echo "s/@prefix@/$(DJDIR)/ ">> config.sed -echo "s/@CC@/gcc/ ">> config.sed -echo "s/@CFLAGS@/-O2 -g/ ">> config.sed -if "%1"=="no-float" goto nofloat -if "%1"=="NO-FLOAT" goto nofloat -if "%1"=="NO_FLOAT" goto nofloat -if "%1"=="no_float" goto nofloat -echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/ ">> config.sed -goto floatdone -:nofloat -echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -DNO_FLOAT/ ">> config.sed -:floatdone -echo "s/@LDFLAGS@// ">> config.sed -echo "s/@RANLIB@/ranlib/ ">> config.sed -echo "s/@DEFS@// ">> config.sed -echo "s/@REMOTE@/stub/ ">> config.sed -echo "s/@ALLOCA@// ">> config.sed -echo "s/@LIBS@// ">> config.sed -echo "s/@LIBOBJS@// ">> config.sed -echo "s/@SET_MAKE@// ">> config.sed -echo "s/@NEED_SETGID@/false/ ">> config.sed -echo "s/@INSTALL_PROGRAM@/install/ ">> config.sed -echo "s/@INSTALL_DATA@/install -m 644/ ">> config.sed -echo "s/@INSTALL@/install/ ">> config.sed -echo "s/^Makefile *:/_Makefile:/ ">> config.sed -echo "s/^config.h *:/_config.h:/ ">> config.sed -echo "s/^defines *=.*$/defines =/ ">> config.sed -echo "/mv -f make.new make/d ">> config.sed - -echo "s/cd glob; $(MAKE)/$(MAKE) -C glob/ ">> config.sed - -echo "/^tagsrcs *=/s/\$(srcs)/$(srcs:.h.in=.h)/ ">> config.sed - -echo "s/\*.o/*.o *.exe make.new/ ">> config.sed -echo "s/\.info\*/.i*/g ">> config.sed - -sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed -if exist config2.sed goto SedOk -echo To configure Make you need a Unix-style Sed program! +update %XSRC%/Makefile.DOS ./Makefile +echo Done. +if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%" goto End -:SedOk -sed -f config2.sed Makefile.in >> Makefile -del config.sed -del config2.sed -cd glob -call configure -cd .. +:SmallEnv +echo Your environment is too small. Please enlarge it and run me again. + :End +set XRSC= diff --git a/configure.in b/configure.in index 4eb6091..862e538 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ AC_REVISION([$Id$]) AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir. -AM_INIT_AUTOMAKE(make, 3.75.91) +AM_INIT_AUTOMAKE(make, 3.75.92) AM_CONFIG_HEADER(config.h) AC_CONFIG_SUBDIRS(glob) diff --git a/dir.c b/dir.c index ede809f..d187c03 100644 --- a/dir.c +++ b/dir.c @@ -1,5 +1,5 @@ /* Directory hashing for GNU Make. -Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -179,13 +179,16 @@ vmsstat_dir (name, st) { *s++ = 0; st->st_dev = (char *)vms_hash (name); + h = vms_hash (s); + *(s-1) = ':'; } else { st->st_dev = 0; s = name; + h = vms_hash (s); } - h = vms_hash (s); + st->st_ino[0] = h & 0xff; st->st_ino[1] = h & 0xff00; st->st_ino[2] = h >> 16; diff --git a/file.c b/file.c index dbb8fc3..e4ea0bd 100644 --- a/file.c +++ b/file.c @@ -1,5 +1,5 @@ /* Target file hash table management for GNU Make. -Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -541,9 +541,7 @@ print_file (f) struct file *f; { register struct dep *d; -#ifdef VMS - extern char *cvt_time PARAMS ((unsigned long)); -#endif + putchar ('\n'); if (!f->is_target) puts ("# Not a target:"); @@ -579,13 +577,8 @@ print_file (f) else if (f->last_mtime == (time_t) -1) puts ("# File does not exist."); else -#ifdef VMS - printf ("# Last modified %.24s (%0lx)\n", - cvt_time(f->last_mtime), (unsigned long) f->last_mtime); -#else printf ("# Last modified %.24s (%ld)\n", ctime (&f->last_mtime), (long int) f->last_mtime); -#endif printf ("# File has%s been updated.\n", f->updated ? "" : " not"); switch (f->command_state) diff --git a/filedef.h b/filedef.h index 5da41d8..b1e6d31 100644 --- a/filedef.h +++ b/filedef.h @@ -1,5 +1,5 @@ /* Definition of target file data structures for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 97 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -112,9 +112,14 @@ extern time_t f_mtime (); trouble when the machine running make and the machine holding a file have different ideas about what time it is; and can also lose for `force' targets, which need to be considered newer than anything that depends on - them, even if said dependents' modtimes are in the future. */ -#define NEW_MTIME INTEGER_TYPE_MAXIMUM (time_t) - + them, even if said dependents' modtimes are in the future. + + If time_t is unsigned, its maximum value is the same as "(time_t) -1", + so use one less than that, because -1 is used for non-existing files. */ +#define NEW_MTIME \ + (INTEGER_TYPE_SIGNED (time_t) \ + ? INTEGER_TYPE_MAXIMUM (time_t) \ + : (INTEGER_TYPE_MAXIMUM (time_t) - 1)) #define check_renamed(file) \ while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */ diff --git a/function.c b/function.c index a6496fa..e64afa0 100644 --- a/function.c +++ b/function.c @@ -1,5 +1,5 @@ /* Variable function expansion for GNU Make. -Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff --git a/implicit.c b/implicit.c index 430a440..f7298c6 100644 --- a/implicit.c +++ b/implicit.c @@ -1,5 +1,5 @@ /* Implicit rule searching for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff --git a/job.c b/job.c index 9d11ffc..09b9469 100644 --- a/job.c +++ b/job.c @@ -1,6 +1,5 @@ /* Job execution and handling for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96 - Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -788,7 +787,12 @@ start_job_command (child) /* Optimize an empty command. People use this for timestamp rules, and forking a useless shell all the time leads to inefficiency. */ - if ((argv[0] && !strcmp(argv[0], "/bin/sh")) + if ( +#ifdef __MSDOS__ + unixy_shell /* the test is complicated and we already did it */ +#else + (argv[0] && !strcmp(argv[0], "/bin/sh")) +#endif && (argv[1] && !strcmp(argv[1], "-c")) && (argv[2] && !strcmp(argv[2], ":")) && argv[3] == NULL) @@ -1866,7 +1870,7 @@ construct_command_argv_internal (line, restp, shell, ifs) if (*p == instring) { instring = 0; - if (*ap == '\0') + if (ap == new_argv[0] || *(ap-1) == '\0') last_argument_was_empty = 1; } else if (*p == '\\' && p[1] == '\n') diff --git a/main.c b/main.c index e3518d5..11bfc88 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,5 @@ /* Argument parsing and main program of GNU Make. -Copyright (C) 1988, 89, 90, 91, 94, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -2324,7 +2324,7 @@ print_version () printf ("-%s", remote_description); printf (", by Richard Stallman and Roland McGrath.\n\ -%sCopyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96\n\ +%sCopyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97\n\ %s\tFree Software Foundation, Inc.\n\ %sThis is free software; see the source for copying conditions.\n\ %sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ diff --git a/maintMakefile b/maintMakefile index aeb5616..1fcd09e 100644 --- a/maintMakefile +++ b/maintMakefile @@ -5,12 +5,30 @@ # Find the glob source files... this might be dangerous, but we're maintainers! # globsrc := $(wildcard glob/*.c) +globhdr := $(wildcard glob/*.h) + +TEMPLATES = README config.ami configh.dos config.h.W32 config.h-vms # General rule for turning a .template into a regular file. # -README : % : %.template configure.in +$(TEMPLATES) : % : %.template configure.in + rm -f $@ + sed -e 's@%VERSION%@$(VERSION)@' \ + -e 's@%PACKAGE%@$(PACKAGE)@' \ + $< > $@ + chmod a-w $@ + +# Construct Makefile.DOS +# +Makefile.DOS: Makefile.DOS.template Makefile.am configure.in rm -f $@ - sed 's/%VERSION%/$(version)/' < $< > $@ + sed -e 's@%VERSION%@$(VERSION)@' \ + -e 's@%PROGRAMS%@$(bin_PROGRAMS)@' \ + -e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@' \ + -e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@' \ + -e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@' \ + -e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@' \ + $< > $@ chmod a-w $@ # Construct build.sh.in diff --git a/make.h b/make.h index 1889d85..d99ccd0 100644 --- a/make.h +++ b/make.h @@ -1,5 +1,5 @@ /* Miscellaneous global declarations and portability cruft for GNU Make. -Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -72,7 +72,7 @@ extern int errno; #include /* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */ -#if defined (_POSIX_VERSION) && !defined (ultrix) +#if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS) #define POSIX #endif #endif @@ -293,8 +293,12 @@ extern char *alloca (); #if defined(__MSDOS__) || defined(WINDOWS32) #define PATH_SEPARATOR_CHAR ';' #else +#if defined(VMS) +#define PATH_SEPARATOR_CHAR ',' +#else #define PATH_SEPARATOR_CHAR ':' #endif +#endif #ifdef WINDOWS32 #include diff --git a/make.texinfo b/make.texinfo index 25c7ec9..1958134 100644 --- a/make.texinfo +++ b/make.texinfo @@ -9,9 +9,9 @@ @set RCSID $Id$ @set EDITION 0.51 -@set VERSION 3.75 Beta -@set UPDATED 9 May 1996 -@set UPDATE-MONTH May 1996 +@set VERSION 3.76 Beta +@set UPDATED 26 Aug 1997 +@set UPDATE-MONTH Aug 1997 @comment The ISBN number might need to change on next publication. @set ISBN 1-882114-78-7 @c CHANGE THIS BEFORE PRINTING AGAIN! --roland 9may96 @@ -73,7 +73,7 @@ by the Free Software Foundation. @author Richard M. Stallman and Roland McGrath @page @vskip 0pt plus 1filll -Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94, '95, '96 Free Software Foundation, Inc. +Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 59 Temple Place -- Suite 330, @* diff --git a/makefile.com b/makefile.com index 0bdbec1..23c720d 100644 --- a/makefile.com +++ b/makefile.com @@ -5,7 +5,7 @@ $! P1 is non-empty if you want to link with the VAXCRTL library instead $! of the shareable executable $! $ def/nolog sys sys$library: -$ filelist = "alloca commands default dir expand file function implicit job main misc read remake remote-stub rule signame variable version vmsfunctions vmsify vpath [.glob]glob [.glob]fnmatch getopt getopt1" +$ filelist = "alloca ar arscan commands default dir expand file function implicit job main misc read remake remote-stub rule signame variable version vmsfunctions vmsify vpath [.glob]glob [.glob]fnmatch getopt getopt1" $ copy config.h-vms config.h $ n=0 $ loop: @@ -17,18 +17,18 @@ $ n = n + 1 $ goto loop $ linkit: $ if p1 .nes. "" then goto link_using_library -$ link/exe=make alloca,commands,default,dir,expand,file,function,- +$ link/exe=make alloca,ar,arscan,commands,default,dir,expand,file,function,- implicit,job,main,misc,read,remake,remote-stub,rule,- signame,variable,version,vmsfunctions,vmsify,vpath,- glob,fnmatch,getopt,getopt1 $ exit $ link_using_library: -$ link/exe=make alloca,commands,default,dir,expand,file,function,- +$ link/exe=make alloca,ar,arscan,commands,default,dir,expand,file,function,- implicit,job,main,misc,read,remake,remote-stub,rule,- signame,variable,version,vmsfunctions,vmsify,vpath,- glob,fnmatch,getopt,getopt1,sys$library:vaxcrtl/lib $! $ compileit : subroutine -$ cc/include=([],[.glob])/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS","NO_ARCHIVES") 'p1' +$ cc/include=([],[.glob])/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") 'p1' $ exit $ endsubroutine : compileit diff --git a/makefile.vms b/makefile.vms index 9c84a33..a1ad841 100644 --- a/makefile.vms +++ b/makefile.vms @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 1989, 1996 Free Software Foundation, Inc. +# Copyright (C) 1988, 1989, 1996, 1997 Free Software Foundation, Inc. # This file is part of GNU Make. # # VMS extensions from GNU Make 3.60 imported by @@ -31,13 +31,13 @@ CFLAGS = $(defines) /debug/noopt/include=([],[.glob]) #LDFLAGS = /deb LDFLAGS = -defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","NO_ARCHIVES","allocated_variable_expand_for_file=alloc_var_expand_for_file") +defines = /define=("unlink=remove","HAVE_CONFIG_H","VMS","allocated_variable_expand_for_file=alloc_var_expand_for_file") 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 +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. diff --git a/misc.c b/misc.c index e331f98..dbbe41f 100644 --- a/misc.c +++ b/misc.c @@ -1,5 +1,5 @@ /* Miscellaneous generic support functions for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,95,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff --git a/read.c b/read.c index 1a0fae8..bf7f80c 100644 --- a/read.c +++ b/read.c @@ -1,5 +1,5 @@ /* Reading and parsing of makefiles for GNU Make. -Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -907,13 +907,17 @@ do_define (name, namelen, origin, lineno, infile, filename) initbuffer (&lb); while (!feof (infile)) { + unsigned int len; + lineno += nlines; nlines = readline (&lb, infile, filename, lineno); collapse_continuations (lb.buffer); p = next_token (lb.buffer); - if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5)) + len = strlen (p); + if ((len == 5 || (len > 5 && isblank (p[5]))) + && !strncmp (p, "endef", 5)) { p += 5; remove_comments (p); @@ -932,8 +936,7 @@ do_define (name, namelen, origin, lineno, infile, filename) } else { - unsigned int len = strlen (lb.buffer); - + len = strlen (lb.buffer); /* Increase the buffer size if necessary. */ if (idx + len + 1 > length) { diff --git a/readme.vms b/readme.vms index b402cb4..8284876 100644 --- a/readme.vms +++ b/readme.vms @@ -1,14 +1,14 @@ -This is the VMS port of GNU Make version 3.75. +This is the VMS port of GNU Make. It is based on the VMS port of GNU Make 3.60 by Mike Moretti. -This port was done by Klaus Kämpf (kkaempf@progis.de) of -proGIS Software, Aachen, Germany +This port was done by Klaus Kämpf of +proGIS Software, Aachen, Germany. To build Make, simply type @makefile. This should compile all the -necessary files and link Make. -There is also a file called makefile.vms. If you already have GNU -Make 3.74 built you can just use Make with this makefile to rebuild. +necessary files and link Make. There is also a file called +makefile.vms. If you already have GNU Make built you can just use +Make with this makefile to rebuild. Here are some notes about GNU Make for VMS: diff --git a/remake.c b/remake.c index 762ce98..b4f15cf 100644 --- a/remake.c +++ b/remake.c @@ -1,5 +1,5 @@ /* Basic dependency engine for GNU Make. -Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -56,10 +56,6 @@ static int library_search PARAMS ((char **lib, time_t *mtime_ptr)); extern time_t f_mtime PARAMS ((struct file *file, int search)); -#ifdef VMS -extern int vms_stat PARAMS ((char *name, struct stat *buf)); -#endif - /* Remake all the goals in the `struct dep' chain GOALS. Return -1 if nothing was done, 0 if all goals were updated successfully, or 1 if a goal failed. @@ -782,7 +778,7 @@ check_dep (file, depth, this_mtime, must_make_ptr) check_renamed (file); mtime = file_mtime (file); check_renamed (file); - if (mtime > this_mtime) + if (mtime != (time_t) -1 && mtime > this_mtime) *must_make_ptr = 1; /* Otherwise, update all non-intermediate files we depend on, if necessary, and see whether any of them is more @@ -1079,24 +1075,24 @@ f_mtime (file, search) We only need to do this once, for now. */ static time_t now = 0; - if (!clock_skew_detected && mtime != -1 && mtime > now && ! file->updated) + if (!clock_skew_detected + && mtime != (time_t)-1 && mtime > now + && !file->updated) { /* This file's time appears to be in the future. Update our concept of the present, and compare again. */ -#ifdef VMS - /* Handle vms 64bit to 32bit time hack introduced in vms_stat ... */ - static unsigned long vms_now[2]; /* assumes 32 bit long ! */ - sys$gettim (vms_now); - now = ((vms_now[0]>>24) & 0xff) + ((vms_now[1]<<8) & 0xffffff00); -#else + extern time_t time (); time (&now); -#endif + #ifdef WINDOWS32 /* * FAT filesystems round time to nearest even second(!). Just * allow for any file (NTFS or FAT) to perhaps suffer from this * braindamage. + * + * Apparently, this doesn't happen with the MS-DOS/DJGPP port, + * although MS-DOS and MS-Windows 3.X/9X also use FAT filesystems. */ if (mtime > now && (((mtime % 2) == 0) && ((mtime-1) > now))) #else @@ -1131,11 +1127,7 @@ name_mtime (name) { struct stat st; -#ifdef VMS - if (vms_stat (name, &st) < 0) -#else if (stat (name, &st) < 0) -#endif return (time_t) -1; return (time_t) st.st_mtime; diff --git a/variable.c b/variable.c index 1717058..c0dc3dc 100644 --- a/variable.c +++ b/variable.c @@ -1,5 +1,5 @@ /* Internals of variables for GNU Make. -Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 96 Free Software Foundation, Inc. +Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify diff --git a/vmsdir.h b/vmsdir.h index 50b50e8..4cf1583 100644 --- a/vmsdir.h +++ b/vmsdir.h @@ -4,8 +4,10 @@ #define MAXNAMLEN 255 +#ifndef __DECC typedef unsigned long u_long; typedef unsigned short u_short; +#endif struct direct { off_t d_off; diff --git a/vmsify.c b/vmsify.c index d457e65..35e30bd 100644 --- a/vmsify.c +++ b/vmsify.c @@ -330,9 +330,9 @@ vmsify (name, type) else { strcpy (vptr, "[."); - nstate = N_DOT; vptr += 2; copyto (&vptr, &fptr, '/', 1); + nstate = N_OPEN; state = 9; } } @@ -738,6 +738,7 @@ vmsify (name, type) s = strchr (vptr, ']'); if (s != 0) { + nstate = N_OPEN; while (s > vptr) { s--; diff --git a/vpath.c b/vpath.c index 2311ac1..ed7267b 100644 --- a/vpath.c +++ b/vpath.c @@ -1,5 +1,5 @@ /* Implementation of pattern-matching file search paths for GNU Make. -Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -145,14 +145,15 @@ build_vpath_lists () variable. If SEARCHPATH is nil, remove all previous listings with the same - pattern. If PATTERN is nil, remove all VPATH listings. - Existing and readable directories that are not "." given in the - searchpath separated by colons are loaded into the directory hash - table if they are not there already and put in the VPATH searchpath - for the given pattern with trailing slashes stripped off if present - (and if the directory is not the root, "/"). - The length of the longest entry in the list is put in the structure as well. - The new entry will be at the head of the VPATHS chain. */ + pattern. If PATTERN is nil, remove all VPATH listings. Existing + and readable directories that are not "." given in the searchpath + separated by the path element separator (defined in make.h) are + loaded into the directory hash table if they are not there already + and put in the VPATH searchpath for the given pattern with trailing + slashes stripped off if present (and if the directory is not the + root, "/"). The length of the longest entry in the list is put in + the structure as well. The new entry will be at the head of the + VPATHS chain. */ void construct_vpath_list (pattern, dirpath) @@ -213,10 +214,10 @@ construct_vpath_list (pattern, dirpath) convert_vpath_to_windows32(dirpath, ';'); #endif - /* Figure out the maximum number of VPATH entries and - put it in MAXELEM. We start with 2, one before the - first colon and one nil, the list terminator and - increment our estimated number for each colon or blank we find. */ + /* Figure out the maximum number of VPATH entries and put it in + MAXELEM. We start with 2, one before the first separator and one + nil (the list terminator) and increment our estimated number for + each separator or blank we find. */ maxelem = 2; p = dirpath; while (*p != '\0') @@ -226,7 +227,7 @@ construct_vpath_list (pattern, dirpath) vpath = (char **) xmalloc (maxelem * sizeof (char *)); maxvpath = 0; - /* Skip over any initial colons and blanks. */ + /* Skip over any initial separators and blanks. */ p = dirpath; while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) ++p; @@ -271,7 +272,7 @@ construct_vpath_list (pattern, dirpath) free (v); } - /* Skip over colons and blanks between entries. */ + /* Skip over separators and blanks between entries. */ while (*p == PATH_SEPARATOR_CHAR || isblank (*p)) ++p; } @@ -435,7 +436,9 @@ selective_vpath_search (path, file, mtime_ptr) /* Add the directory prefix already in *FILE. */ if (name_dplen > 0) { +#ifndef VMS *n++ = '/'; +#endif bcopy (*file, n, name_dplen); n += name_dplen; } @@ -446,12 +449,14 @@ selective_vpath_search (path, file, mtime_ptr) n[-1] = '/'; #endif /* Now add the name-within-directory at the end of NAME. */ +#ifndef VMS if (n != name && n[-1] != '/') { *n = '/'; bcopy (filename, n + 1, flen + 1); } else +#endif bcopy (filename, n, flen + 1); /* Check if the file is mentioned in a makefile. If *FILE is not @@ -464,7 +469,7 @@ selective_vpath_search (path, file, mtime_ptr) inadequately commented change in July 1990; I am not sure off hand what problem it fixes. - In December 1993 I loosened of this restriction to allow a file + In December 1993 I loosened this restriction to allow a file to be chosen if it is mentioned as a target in a makefile. This seem logical. */ { @@ -478,6 +483,9 @@ selective_vpath_search (path, file, mtime_ptr) /* That file wasn't mentioned in the makefile. See if it actually exists. */ +#ifdef VMS + exists_in_cache = exists = dir_file_exists_p (vpath[i], filename); +#else /* Clobber a null into the name at the last slash. Now NAME is the name of the directory to look in. */ *n = '\0'; @@ -486,6 +494,7 @@ selective_vpath_search (path, file, mtime_ptr) construct_vpath_list or the code just above put it there. Does the file we seek exist in it? */ exists_in_cache = exists = dir_file_exists_p (name, filename); +#endif } if (exists) @@ -498,8 +507,10 @@ selective_vpath_search (path, file, mtime_ptr) struct stat st; +#ifndef VMS /* Put the slash back in NAME. */ *n = '/'; +#endif if (!exists_in_cache /* Makefile-mentioned file need not exist. */ || stat (name, &st) == 0) /* Does it really exist? */ diff --git a/w32/compat/dirent.c b/w32/compat/dirent.c index 9416828..db871a9 100644 --- a/w32/compat/dirent.c +++ b/w32/compat/dirent.c @@ -90,7 +90,7 @@ closedir(DIR *pDir) struct dirent * readdir(DIR* pDir) { - WINDOWS32_FIND_DATA wfdFindData; + WIN32_FIND_DATA wfdFindData; if (!pDir) { errno = EINVAL; diff --git a/w32/include/sub_proc.h b/w32/include/sub_proc.h index 700b945..d7478bb 100644 --- a/w32/include/sub_proc.h +++ b/w32/include/sub_proc.h @@ -9,13 +9,6 @@ * $Source$ * * $Revision$ - * - * Description: - * - * (C) COPYRIGHT TIVOLI Systems, Inc. 1991-1994 - * Unpublished Work - * All Rights Reserved - * Licensed Material - Property of TIVOLI Systems, Inc. */ /* $Id$ */ diff --git a/w32/subproc/NMakefile b/w32/subproc/NMakefile index 2843a82..ab11d96 100644 --- a/w32/subproc/NMakefile +++ b/w32/subproc/NMakefile @@ -1,7 +1,7 @@ # NOTE: If you have no `make' program at all to process this makefile, run # `build.bat' instead. # -# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc +# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc # This file is part of GNU Make. # # GNU Make is free software; you can redistribute it and/or modify @@ -27,7 +27,7 @@ CC = cl OUTDIR=. MAKEFILE=NMakefile -CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WINDOWS32 /D _WINDOWS -I. -I../include +CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS -I. -I../include 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/ diff --git a/w32/subproc/build.bat b/w32/subproc/build.bat index 3c53a43..955f6d5 100644 --- a/w32/subproc/build.bat +++ b/w32/subproc/build.bat @@ -1,10 +1,10 @@ if not exist .\WinDebug\nul mkdir .\WinDebug -cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c -cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c -cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c +cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c +cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c +cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c lib.exe /NOLOGO /OUT:.\WinDebug\subproc.lib .\WinDebug/misc.obj .\WinDebug/sub_proc.obj .\WinDebug/w32err.obj if not exist .\WinRel\nul mkdir .\WinRel -cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c -cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c -cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c +cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib .\WinRel/misc.obj .\WinRel/sub_proc.obj .\WinRel/w32err.obj diff --git a/w32/subproc/sub_proc.c b/w32/subproc/sub_proc.c index 55aafec..4166d34 100644 --- a/w32/subproc/sub_proc.c +++ b/w32/subproc/sub_proc.c @@ -319,14 +319,10 @@ find_file(char *exec_path, LPOFSTRUCT file_info) char *fname; char *ext; - if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info, - OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { - return(exec_handle); - } - fname = malloc(strlen(exec_path) + 5); strcpy(fname, exec_path); ext = fname + strlen(fname); + strcpy(ext, ".exe"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { @@ -334,6 +330,13 @@ find_file(char *exec_path, LPOFSTRUCT file_info) return(exec_handle); } + strcpy(ext, ".cmd"); + if ((exec_handle = (HANDLE)OpenFile(fname, file_info, + OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { + free(fname); + return(exec_handle); + } + strcpy(ext, ".bat"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { @@ -341,6 +344,13 @@ find_file(char *exec_path, LPOFSTRUCT file_info) return(exec_handle); } + /* should .com come before this case? */ + if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info, + OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { + free(fname); + return(exec_handle); + } + strcpy(ext, ".com"); if ((exec_handle = (HANDLE)OpenFile(fname, file_info, OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) { @@ -489,14 +499,8 @@ process_begin( startInfo.hStdOutput = (HANDLE)pproc->sv_stdout[1]; startInfo.hStdError = (HANDLE)pproc->sv_stderr[1]; - /* - * See if we need to setuid to a different user. - */ - if (as_user) { - return -1; - } - if (as_user) { + if (envblk) free(envblk); return -1; } else { if (CreateProcess( @@ -514,6 +518,7 @@ process_begin( pproc->last_err = GetLastError(); pproc->lerrno = E_FORK; fprintf(stderr, "process_begin: CreateProcess(%s, %s, ...) failed.\n", exec_path, command_line); + if (envblk) free(envblk); free( command_line ); return(-1); } @@ -538,6 +543,7 @@ process_begin( } free( command_line ); + if (envblk) free(envblk); pproc->lerrno=0; return 0; } @@ -1003,14 +1009,35 @@ make_command_line( char *shell_name, char *exec_path, char **argv) char** nargv; char* buf; int i; + char** shargv = NULL; + char* p = NULL; + char* q = NULL; + int j = 0; if (shell_name) { + /* handle things like: #!/bin/sh -x */ + + /* count tokens */ + q = strdup(shell_name); + for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++); + free(q); + + /* copy tokens */ + q = strdup(shell_name); + shargv = (char **) malloc((j+1) * sizeof (char *)); + for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++) + shargv[j] = strdup(p); + shargv[j] = NULL; + free(q); + + /* create argv */ for (i = 0; argv[i]; i++); - i += 2; + i += (j+1); nargv = (char **) malloc(i * sizeof (char *)); - nargv[0] = shell_name; - for (i = 1; argv[i-1]; i++) - nargv[i] = argv[i-1]; + for (i = 0; shargv[i] != NULL; i++) + nargv[i] = shargv[i]; + for (j = 0; argv[j]; j++, i++) + nargv[i] = argv[j]; nargv[i] = NULL; } else nargv = argv; @@ -1018,8 +1045,12 @@ make_command_line( char *shell_name, char *exec_path, char **argv) /* create string suitable for CreateProcess() */ buf = fix_command_line(nargv); - if (shell_name) + if (shell_name) { + for (j = 0; shargv[j]; j++) + free(shargv[j]); + free(shargv); free(nargv); + } return buf; } -- cgit v1.2.3