Updates for GNU make 3.75.92.
authorPaul Smith <psmith@gnu.org>
Wed, 27 Aug 1997 20:30:54 +0000 (20:30 +0000)
committerPaul Smith <psmith@gnu.org>
Wed, 27 Aug 1997 20:30:54 +0000 (20:30 +0000)
43 files changed:
AUTHORS
ChangeLog
GNUmakefile
Makefile.DOS.template [new file with mode: 0644]
Makefile.am
Makefile.ami
NMakefile.template
README.Amiga
README.DOS.template
README.template
TODO.private [new file with mode: 0644]
ar.c
arscan.c
build.template
build_w32.bat
commands.c
configure.bat
configure.in
dir.c
file.c
filedef.h
function.c
implicit.c
job.c
main.c
maintMakefile
make.h
make.texinfo
makefile.com
makefile.vms
misc.c
read.c
readme.vms
remake.c
variable.c
vmsdir.h
vmsify.c
vpath.c
w32/compat/dirent.c
w32/include/sub_proc.h
w32/subproc/NMakefile
w32/subproc/build.bat
w32/subproc/sub_proc.c

diff --git a/AUTHORS b/AUTHORS
index 225eb244a5cc84279a7a1aac7ab06ef3045eb9d5..b66bb8f9b26d0deae85301a78547608ef68e8b77 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -22,7 +22,7 @@ GNU Make porting efforts:
 
   Port to VMS by:
       Klaus Kaempf <kkaempf@progis.de>
-
+      Archive support/Bug fixes by John W. Eaton <jwe@bevo.che.wisc.edu>
 
   Port to Amiga by:
       Aaron Digulla <digulla@fh-konstanz.de>
index 6bdd8ce5bdad762d729d3deb6995a6c1d0f54389..348779ffd7991ec5e6dd625520324ece5dc0ab6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,91 @@
+Tue Aug 26 11:59:15 1997  Paul D. Smith  <psmith@baynetworks.com>
+
+       * 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  <eliz@is.elta.co.il>
+
+       * 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 <sys/config.h>.
+
+       * README.DOS: Update instructions.
+
+Fri Aug 22 1997  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * 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  <jwe@bevo.che.wisc.edu>
+
+        * 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  <jwe@bevo.che.wisc.edu>
+
+        * 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  <jwe@bevo.che.wisc.edu>
+
+       * 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  <rob_tulloh@tivoli.com>
+
+       * 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  <psmith@baynetworks.com>
 
        * Version 3.75.91
index 272e37b0f0c47998a194b355e1faf79a69322b68..aedde5927886fcc692b2fae5c3cc9f4b814064d4 100644 (file)
@@ -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 (file)
index 0000000..e2f8135
--- /dev/null
@@ -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:
index 17e2acde91811da953327b5088035da2b1227f38..3a8451e89b159bcd2e6375352ad43e3cf25a7129 100644 (file)
@@ -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
index e6bedf7a758964c90bb77d2e6c830f0ccbb5697d..e24da7464891dd440240bc479dfa00ef89e68b8d 100644 (file)
 #      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
 
index 49e4fedaf5ee5beb15f00fe77475a18e58249b36..d82dbce49874eb7dd200fa6d580bcc8524e473bb 100644 (file)
@@ -1,7 +1,7 @@
 # NOTE: If you have no `make' program at all to process this makefile, run\r
 # `build_w32.bat' instead.\r
 #\r
-# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.\r
+# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.\r
 # This file is part of GNU Make.\r
 #\r
 # GNU Make is free software; you can redistribute it and/or modify\r
@@ -29,9 +29,9 @@ OUTDIR=.
 MAKEFILE=NMakefile\r
 SUBPROC_MAKEFILE=NMakefile\r
 \r
-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\r
+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\r
 CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb\r
-CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/ \r
+CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/\r
 \r
 LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\\r
        /INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \\r
@@ -55,13 +55,15 @@ w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib:
 config.h: config.h.W32\r
        copy $? $@\r
 \r
-Release: \r
+Release:\r
        nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe\r
-Debug: \r
+Debug:\r
        nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe\r
 \r
 clean:\r
        rmdir /s /q WinDebug WinRel\r
+       rmdir /s /q w32\subproc\WinDebug w32\subproc\WinRel\r
+       erase config.h\r
 \r
 $(OUTDIR):\r
        if not exist .\$@\nul mkdir .\$@\r
index e8eca68b88136a0f35fdc55cb12e3c2968cd9270..6f08dd812ee3f29551dd3c009a4a9fd32c09d58f 100644 (file)
@@ -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):
 
index 6226f7b14ce49366ebe0fcee07c092dc71797a54..065c23916fa1a5e152fbe3eeabb261b6b66d2660 100644 (file)
@@ -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
index 735815c8c49af8c9061472fb8dd7a9a2cb56bc2a..257edde5c8683055a442980189604b2f991ea474 100644 (file)
@@ -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 (file)
index 0000000..21f79e2
--- /dev/null
@@ -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 117e11b4be4bebff795b0e9bac627ddcd60c7f98..7167dc3e33877ac9fe9d45dfd91fbce1e35fd203 100644 (file)
--- 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 <lbrdef.h>
-#include <mhddef.h>
-#include <credef.h>
-#include <descrip.h>
-#include <ctype.h>
-#if __DECC
-#include <lbr$routines.h>
-#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
 \f
 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 */
 \f
 /* 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");
index e63659e5e649988f8e4b4d90121a978e5e88516e..9cf746bbbc516bf7c864815cde81bf26248ff21b 100644 (file)
--- 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"
 
 
 #ifndef        NO_ARCHIVES
 \f
+#ifdef VMS
+#include <lbrdef.h>
+#include <mhddef.h>
+#include <credef.h>
+#include <descrip.h>
+#include <ctype.h>
+#if __DECC
+#include <unixlib.h>
+#include <lbr$routines.h>
+#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 */
 \f
 /* 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
 }
 \f
+#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
 \f
 #ifdef TEST
 
index 40307ff6648ff2596dbb24f67b69f632f7254410..0cb0216d1208b2e2dc9609533eee348a6cf3c848 100644 (file)
@@ -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
index f164f64152a7ac0d69d86a53d2b8ef686b5c4124..49e91d42ac910f485ab203178ae87bb0ffcae52e 100644 (file)
@@ -10,59 +10,59 @@ echo off
 echo "Creating GNU make for Windows 95/NT"\r
 echo on\r
 if not exist .\WinDebug\nul mkdir .\WinDebug\r
-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\r
+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\r
 echo WinDebug\variable.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\rule.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\remote-stub.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\commands.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\file.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\getloadavg.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\default.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\signame.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\expand.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\dir.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\main.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\getopt1.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\job.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\read.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\version.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\getopt.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\arscan.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\remake.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\misc.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\ar.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\function.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\vpath.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\implicit.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\dirent.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\glob.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\fnmatch.obj >>link.dbg\r
-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\r
+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\r
 echo WinDebug\pathstuff.obj >>link.dbg\r
 echo off\r
 echo "Linking WinDebug/%make%.exe"\r
@@ -73,59 +73,59 @@ if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
 if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"\r
 if not exist .\WinRel\nul mkdir .\WinRel\r
 echo on\r
-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\r
+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\r
 echo WinRel\variable.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\rule.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\remote-stub.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\commands.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\file.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\getloadavg.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\default.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\signame.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\expand.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\dir.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\main.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\getopt1.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\job.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\read.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\version.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\getopt.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\arscan.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\remake.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\misc.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\ar.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\function.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\vpath.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\implicit.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\dirent.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\glob.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\fnmatch.obj >>link.rel\r
-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\r
+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\r
 echo WinRel\pathstuff.obj >>link.rel\r
 echo off\r
 echo "Linking WinRel/%make%.exe"\r
index 81d1a68c4a3185d7e8fb2d4514e21818a110e421..5646b18ecde819a3508f491e34ac926b15264cc5 100644 (file)
@@ -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
index a376aca412d46a0b9bf006e49f328b3deff20815..a357923967090eae76dba25394b6d4bbfff4dd5d 100644 (file)
@@ -1,8 +1,21 @@
 @echo off\r
 echo Configuring MAKE for DJGPP\r
-rem This batch file assumes a unix-type "sed" program\r
 \r
-update configh.dos config.h\r
+rem The SmallEnv trick protects against too small environment block,\r
+rem in which case the values will be truncated and the whole thing\r
+rem goes awry.  COMMAND.COM will say "Out of environment space", but\r
+rem many people don't care, so we force them to care by refusing to go.\r
+\r
+rem Where is the srcdir?\r
+set XSRC=.\r
+if not "%XSRC%"=="." goto SmallEnv\r
+if "%1%"=="" goto SrcDone\r
+set XSRC=%1\r
+if not "%XSRC%"=="%1" goto SmallEnv\r
+\r
+:SrcDone\r
+\r
+update %XSRC%/configh.dos ./config.h\r
 \r
 rem Do they have Make?\r
 redir -o junk.$$$ -eo make -n -f NUL\r
@@ -15,69 +28,17 @@ if exist junk.$$$ del junk.$$$
 echo No Make program found--use DOSBUILD.BAT to build Make.\r
 goto End\r
 \r
-rem They do have Make. Generate Makefiles.\r
+rem They do have Make. Generate the Makefile.\r
 \r
 :MakeOk\r
 del junk.$$$\r
-echo # Makefile generated for DJGPP by "configure.bat"> Makefile\r
-\r
-if exist config.sed del config.sed\r
-\r
-echo ": try_sl                                         ">> config.sed\r
-echo "/\\$/ {                                          ">> config.sed\r
-echo " N                                               ">> config.sed\r
-echo " s/[     ]*\\\n[         ]*/ /                   ">> config.sed\r
-echo " b try_sl                                        ">> config.sed\r
-echo "}                                                        ">> config.sed\r
-\r
-echo "s/@srcdir@/./                                    ">> config.sed\r
-echo "s/@exec_prefix@/$(DJDIR)/                                ">> config.sed\r
-echo "s/@prefix@/$(DJDIR)/                             ">> config.sed\r
-echo "s/@CC@/gcc/                                      ">> config.sed\r
-echo "s/@CFLAGS@/-O2 -g/                               ">> config.sed\r
-if "%1"=="no-float" goto nofloat\r
-if "%1"=="NO-FLOAT" goto nofloat\r
-if "%1"=="NO_FLOAT" goto nofloat\r
-if "%1"=="no_float" goto nofloat\r
-echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/                    ">> config.sed\r
-goto floatdone\r
-:nofloat\r
-echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -DNO_FLOAT/         ">> config.sed\r
-:floatdone\r
-echo "s/@LDFLAGS@//                                    ">> config.sed\r
-echo "s/@RANLIB@/ranlib/                               ">> config.sed\r
-echo "s/@DEFS@//                                       ">> config.sed\r
-echo "s/@REMOTE@/stub/                                 ">> config.sed\r
-echo "s/@ALLOCA@//                                     ">> config.sed\r
-echo "s/@LIBS@//                                       ">> config.sed\r
-echo "s/@LIBOBJS@//                                    ">> config.sed\r
-echo "s/@SET_MAKE@//                                   ">> config.sed\r
-echo "s/@NEED_SETGID@/false/                           ">> config.sed\r
-echo "s/@INSTALL_PROGRAM@/install/                     ">> config.sed\r
-echo "s/@INSTALL_DATA@/install -m 644/                 ">> config.sed\r
-echo "s/@INSTALL@/install/                             ">> config.sed\r
-echo "s/^Makefile *:/_Makefile:/                       ">> config.sed\r
-echo "s/^config.h *:/_config.h:/                       ">> config.sed\r
-echo "s/^defines *=.*$/defines =/                      ">> config.sed\r
-echo "/mv -f make.new make/d                           ">> config.sed\r
-\r
-echo "s/cd glob; $(MAKE)/$(MAKE) -C glob/              ">> config.sed\r
-\r
-echo "/^tagsrcs *=/s/\$(srcs)/$(srcs:.h.in=.h)/                ">> config.sed\r
-\r
-echo "s/\*.o/*.o *.exe make.new/                       ">> config.sed\r
-echo "s/\.info\*/.i*/g                                 ">> config.sed\r
-\r
-sed -e "s/^\"//" -e "s/\"$//" -e "s/[  ]*$//" config.sed > config2.sed\r
-if exist config2.sed goto SedOk\r
-echo To configure Make you need a Unix-style Sed program!\r
+update %XSRC%/Makefile.DOS ./Makefile\r
+echo Done.\r
+if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"\r
 goto End\r
-:SedOk\r
-sed -f config2.sed Makefile.in >> Makefile\r
-del config.sed\r
-del config2.sed\r
 \r
-cd glob\r
-call configure\r
-cd ..\r
+:SmallEnv\r
+echo Your environment is too small.  Please enlarge it and run me again.\r
+\r
 :End\r
+set XRSC=\r
index 4eb60910c7bc50ce637f735e5edeea35514088c3..862e538bd642025d17ce62575c95799577a14cd7 100644 (file)
@@ -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 ede809f5e4220fc9e843df0bf0c10c86be263ab3..d187c03ec933833ab15b52340c2223594b78ec26 100644 (file)
--- 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 dbb8fc3e0ae95f5e5fcb5005ae2424307e01235f..e4ea0bd1443d883ca682d2dbe3702478917e20cb 100644 (file)
--- 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)
index 5da41d83698bcd4b0ba809c1110dbf944b6767d8..b1e6d31688b6da5a72310cdec75fcf9e19bc3b50 100644 (file)
--- 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.  */
index a6496fa2fe9509200a1efd8cd4f824a7d94455b5..e64afa09a669d83e8251611a6c5e28e372897263 100644 (file)
@@ -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
index 430a440189e9c48bd463b33ee8638d3df3c97ce8..f7298c6c4494f3be6db522ea0186bd928c214de8 100644 (file)
@@ -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 9d11ffc9f824c54191b965564df86599a821c101..09b946939b208f619f370415b3324bfd149127d0 100644 (file)
--- 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 e3518d5d1ad69ab503346bc1b8d981da66ed9f22..11bfc8832d84e4a2e28c38c51be062920d9379fb 100644 (file)
--- 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\
index aeb56167dcd576e3989100acd36d3d4f20d3db53..1fcd09e44a4accd5869e2d13e48fbe68102d14d6 100644 (file)
@@ -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 1889d85e76484e9949c4f8a9ea7aa3016daa8fa0..d99ccd01468424c01ecbf4a10ba6cdfc7117d22d 100644 (file)
--- 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 <unistd.h>
 /* 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 <fcntl.h>
index 25c7ec91058dad1c28ebbfce389bd882f4e4e091..19581349f3eadab29d581fe8845d30329170467e 100644 (file)
@@ -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, @*
index 0bdbec16039f4cf6e59d69b752753094aff9e9b1..23c720d3e334aa5074acc69b07ae0004f9834890 100644 (file)
@@ -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
index 9c84a337835c90c3eb435d531f91da169e35fb56..a1ad8415cee7d2df3e276c1fbc95cf6dd3b722d9 100644 (file)
@@ -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 e331f98ea516249b1f16452bb75bd9983cf3dc83..dbbe41fe373393c96a959d0f7f23139fdfbe5d72 100644 (file)
--- 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 1a0fae897b322296a02ca028774b4872879fe8f5..bf7f80ce462c1e996e165ef8a871ca694bb2f7c5 100644 (file)
--- 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)
            {
index b402cb45d0b905e7b08929b26a36788636327435..8284876b006aa4fe5b38c38bf9f7527661e35279 100644 (file)
@@ -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 <kkaempf@progis.de> 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:
 
index 762ce98a8c6defa7b8c4eb2421d5ea6d41da9cbb..b4f15cf82602f21434d5af557b19a60613789c1a 100644 (file)
--- 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
-
 \f
 /* 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;
index 17170580ea61c602daf24db6dbf39df45b7fa38e..c0dc3dcec47541427ccfaeaa7915bc9eca938bf9 100644 (file)
@@ -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
index 50b50e8a26fd81c90eccd07dca7b6157deffb945..4cf1583a1f2c88102f2afa4489626e4c7f846be3 100644 (file)
--- 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;
index d457e65d4b4d06bb5e805499d72ffc41ea6068be..35e30bd19b0bea1220de6cfe19df6edf1b6d2731 100644 (file)
--- 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 2311ac140375926a7dcd04d08b59a79f8cc3e703..ed7267bfbb7074e7031ebc33ae4bf50256d9c8b6 100644 (file)
--- 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?  */
index 9416828427b1b90e9cd9ccbabf5e7bd22d30744d..db871a90f0ecf4ffa55e6e5fded4e6d32955bb28 100644 (file)
@@ -90,7 +90,7 @@ closedir(DIR *pDir)
 struct dirent *\r
 readdir(DIR* pDir)\r
 {\r
-       WINDOWS32_FIND_DATA wfdFindData;\r
+       WIN32_FIND_DATA wfdFindData;\r
 \r
        if (!pDir) {\r
                errno = EINVAL;\r
index 700b945cb22db4f092782b529a3ea42fe479cb81..d7478bb1c4760e7f2c3f90213fdeffa4a325f2f1 100644 (file)
@@ -9,13 +9,6 @@
  * $Source$\r
  *\r
  * $Revision$\r
- *\r
- * Description: \r
- *\r
- * (C) COPYRIGHT TIVOLI Systems, Inc. 1991-1994\r
- * Unpublished Work\r
- * All Rights Reserved\r
- * Licensed Material - Property of TIVOLI Systems, Inc.\r
  */\r
 \r
 /* $Id$ */\r
index 2843a8289020423d2b259878d2422d0a13a7a60b..ab11d9643b8bda8e74a3915c56f5bc7f39182bb1 100644 (file)
@@ -1,7 +1,7 @@
 # NOTE: If you have no `make' program at all to process this makefile, run\r
 # `build.bat' instead.\r
 #\r
-# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc\r
+# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc\r
 # This file is part of GNU Make.\r
 #\r
 # GNU Make is free software; you can redistribute it and/or modify\r
@@ -27,7 +27,7 @@ CC = cl
 OUTDIR=.\r
 MAKEFILE=NMakefile\r
 \r
-CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WINDOWS32 /D _WINDOWS  -I. -I../include\r
+CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS  -I. -I../include\r
 CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/\r
 CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/\r
 \r
index 3c53a435bb6ea461b8766eff0c7d347987678eab..955f6d5d06f6d2ac3ac5ecaee9eba5a9bd070614 100644 (file)
@@ -1,10 +1,10 @@
 if not exist .\WinDebug\nul mkdir .\WinDebug\r
-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\r
-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\r
-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\r
+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\r
+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\r
+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\r
 lib.exe /NOLOGO /OUT:.\WinDebug\subproc.lib  .\WinDebug/misc.obj  .\WinDebug/sub_proc.obj  .\WinDebug/w32err.obj\r
 if not exist .\WinRel\nul mkdir .\WinRel\r
-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\r
-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\r
-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\r
+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\r
+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\r
+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\r
 lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib  .\WinRel/misc.obj  .\WinRel/sub_proc.obj  .\WinRel/w32err.obj\r
index 55aafec98071253d2feaafc1e6cdea504d42a4cf..4166d3400991e08b1436903e28b9dcef09d04042 100644 (file)
@@ -319,14 +319,10 @@ find_file(char *exec_path, LPOFSTRUCT file_info)
        char *fname;\r
        char *ext;\r
 \r
-       if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info,\r
-                       OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {\r
-               return(exec_handle);\r
-       }\r
-\r
        fname = malloc(strlen(exec_path) + 5);\r
        strcpy(fname, exec_path);\r
        ext = fname + strlen(fname);\r
+\r
        strcpy(ext, ".exe");\r
        if ((exec_handle = (HANDLE)OpenFile(fname, file_info,\r
                        OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {\r
@@ -334,6 +330,13 @@ find_file(char *exec_path, LPOFSTRUCT file_info)
                return(exec_handle);\r
        }\r
 \r
+       strcpy(ext, ".cmd");\r
+       if ((exec_handle = (HANDLE)OpenFile(fname, file_info,\r
+                       OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {\r
+               free(fname);\r
+               return(exec_handle);\r
+       }\r
+\r
        strcpy(ext, ".bat");\r
        if ((exec_handle = (HANDLE)OpenFile(fname, file_info,\r
                        OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {\r
@@ -341,6 +344,13 @@ find_file(char *exec_path, LPOFSTRUCT file_info)
                return(exec_handle);\r
        }\r
 \r
+       /* should .com come before this case? */\r
+       if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info,\r
+                       OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {\r
+               free(fname);\r
+               return(exec_handle);\r
+       }\r
+\r
        strcpy(ext, ".com");\r
        if ((exec_handle = (HANDLE)OpenFile(fname, file_info,\r
                        OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {\r
@@ -489,14 +499,8 @@ process_begin(
        startInfo.hStdOutput = (HANDLE)pproc->sv_stdout[1];\r
        startInfo.hStdError = (HANDLE)pproc->sv_stderr[1];\r
 \r
-       /*\r
-        * See if we need to setuid to a different user.\r
-        */\r
-       if (as_user) {\r
-               return -1;\r
-       }\r
-\r
        if (as_user) {\r
+               if (envblk) free(envblk);\r
                return -1;\r
        } else {\r
                if (CreateProcess(\r
@@ -514,6 +518,7 @@ process_begin(
                        pproc->last_err = GetLastError();\r
                        pproc->lerrno = E_FORK;\r
                        fprintf(stderr, "process_begin: CreateProcess(%s, %s, ...) failed.\n", exec_path, command_line);\r
+                       if (envblk) free(envblk);\r
                        free( command_line );\r
                        return(-1);\r
                }\r
@@ -538,6 +543,7 @@ process_begin(
        }\r
 \r
        free( command_line );\r
+       if (envblk) free(envblk);\r
        pproc->lerrno=0;\r
        return 0;\r
 }\r
@@ -1003,14 +1009,35 @@ make_command_line( char *shell_name, char *exec_path, char **argv)
        char** nargv;\r
        char*  buf;\r
        int    i;\r
+       char** shargv = NULL;\r
+       char*  p = NULL;\r
+       char*  q = NULL;\r
+       int    j = 0;\r
  \r
        if (shell_name) {\r
+               /* handle things like: #!/bin/sh -x */\r
+\r
+               /* count tokens */\r
+               q = strdup(shell_name);\r
+               for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++);\r
+               free(q);\r
+\r
+               /* copy tokens */\r
+               q = strdup(shell_name);\r
+               shargv = (char **) malloc((j+1) * sizeof (char *));\r
+               for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++)\r
+                       shargv[j] = strdup(p);\r
+               shargv[j] = NULL;\r
+               free(q);\r
+\r
+               /* create argv */\r
                for (i = 0; argv[i]; i++);\r
-               i += 2;\r
+               i += (j+1);\r
                nargv = (char **) malloc(i * sizeof (char *));\r
-               nargv[0] = shell_name;\r
-               for (i = 1; argv[i-1]; i++)\r
-                       nargv[i] = argv[i-1];\r
+               for (i = 0; shargv[i] != NULL; i++)\r
+                       nargv[i] = shargv[i];\r
+               for (j = 0; argv[j]; j++, i++)\r
+                       nargv[i] = argv[j];\r
                nargv[i] = NULL;\r
        } else\r
                nargv = argv;\r
@@ -1018,8 +1045,12 @@ make_command_line( char *shell_name, char *exec_path, char **argv)
        /* create string suitable for CreateProcess() */\r
        buf = fix_command_line(nargv);\r
 \r
-       if (shell_name)\r
+       if (shell_name) {\r
+               for (j = 0; shargv[j]; j++)\r
+                       free(shargv[j]);\r
+               free(shargv);\r
                free(nargv);\r
+       }\r
        \r
        return buf;\r
 }\r