mirror of
https://github.com/mirror/make.git
synced 2026-08-20 00:43:29 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e12cad198 | ||
|
|
e2ffc653aa | ||
|
|
4e58a6ca4c | ||
|
|
41dcca8426 | ||
|
|
161a026602 | ||
|
|
e244062995 | ||
|
|
24fec5cb53 | ||
|
|
b903988475 | ||
|
|
6ea87be73b | ||
|
|
f6490d62cf | ||
|
|
480ad62713 | ||
|
|
acd666ce50 | ||
|
|
be3fb0ae6d |
2
AUTHORS
2
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>
|
||||
|
||||
150
ChangeLog
150
ChangeLog
@@ -1,3 +1,153 @@
|
||||
Fri Sep 19 09:20:49 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* Makefile.am: Add loadavg files to clean rules.
|
||||
|
||||
* configure.in (AC_OUTPUT): Remove stamp-config; no longer needed.
|
||||
* Makefile.ami (distclean): Ditto.
|
||||
* SMakefile (distclean): Ditto.
|
||||
|
||||
* main.c (main): Arg count should be int, not char! Major braino.
|
||||
|
||||
Tue Sep 16 10:18:22 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* Version 3.76 released.
|
||||
|
||||
Tue Sep 2 10:07:39 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* function.c (expand_function): When processing $(shell...)
|
||||
translate a CRLF (\r\n) sequence as well as a newline (\n) to a
|
||||
space. Also remove an ending \r\n sequence.
|
||||
* make.texinfo (Shell Function): Document it.
|
||||
|
||||
Fri Aug 29 12:59:06 1997 Rob Tulloh <rob_tulloh@tivoli.com>
|
||||
|
||||
* w32/pathstuff.c (convert_Path_to_windows32): Fix problem where
|
||||
paths which contain single character entries like `.' are not
|
||||
handled correctly.
|
||||
|
||||
* README.W32: Document path handling issues on Windows systems.
|
||||
|
||||
Fri Aug 29 02:01:27 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* Version 3.75.93.
|
||||
|
||||
Thu Aug 28 19:39:06 1997 Rob Tulloh <rob_tulloh@tivoli.com>
|
||||
|
||||
* job.c (exec_command): [WINDOWS32] If exec_command() is invoked
|
||||
from main() to re-exec make, the call to execvp() would
|
||||
incorrectly return control to parent shell before the exec'ed
|
||||
command could run to completion. I believe this is a feature of
|
||||
the way that execvp() is implemented on top of WIN32 APIs. To
|
||||
alleviate the problem, use the supplied process launch function in
|
||||
the sub_proc library and suspend the parent process until the
|
||||
child process has run. When the child exits, exit the parent make
|
||||
with the exit code of the child make.
|
||||
|
||||
Thu Aug 28 17:04:47 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* Makefile.DOS.template (distdir): Fix a line that got wrapped in
|
||||
email.
|
||||
|
||||
* Makefile.am (loadavg): Give the necessary cmdline options when
|
||||
linking loadavg.
|
||||
|
||||
* configure.in: Check for pstat_getdynamic for getloadvg on HP.
|
||||
|
||||
* job.c (start_job_command): [VMS,_AMIGA] Don't perform empty
|
||||
command optimization on these systems; it doesn't make sense.
|
||||
|
||||
Wed Aug 27 17:09:32 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||
|
||||
* Version 3.75.92
|
||||
|
||||
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
|
||||
|
||||
27
GNUmakefile
27
GNUmakefile
@@ -5,16 +5,34 @@
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
NORECURSE = true
|
||||
|
||||
# If the user asked for a specific target, invoke the Mkaefile instead.
|
||||
#
|
||||
.DEFAULT:
|
||||
[ -f Makefile ] || ./configure
|
||||
@[ -f Makefile.in -a -f configure -a -f aclocal.m4 -a -f config.h.in ] \
|
||||
|| $(MAKE) __cfg NORECURSE=
|
||||
@[ -f Makefile ] \
|
||||
|| ./configure
|
||||
$(MAKE) -f Makefile $@
|
||||
|
||||
.PHONY: __cfg __cfg_basic
|
||||
.PHONY: __cfg __cfg_basic TAGS
|
||||
|
||||
# This is variable since the glob subdirectory doesn't use it.
|
||||
#
|
||||
ACCONFIG = acconfig.h
|
||||
|
||||
__cfg: __cfg_basic config.h.in
|
||||
__cfg: __cfg_basic config.h.in TAGS
|
||||
cd glob && $(MAKE) -f ../GNUmakefile __cfg_basic ACCONFIG=
|
||||
ifdef NORECURSE
|
||||
@echo ""; echo "Now you should run one of:"; echo ""; \
|
||||
echo " make all"; \
|
||||
echo " make dist"; \
|
||||
echo " make distdir"; \
|
||||
echo " make distcheck"; echo ""; \
|
||||
echo "Or similar to proceed.";\
|
||||
echo ""
|
||||
endif
|
||||
|
||||
__cfg_basic: aclocal.m4 stamp-h.in configure Makefile.in
|
||||
|
||||
@@ -31,3 +49,6 @@ configure: configure.in aclocal.m4
|
||||
|
||||
Makefile.in: configure.in config.h.in Makefile.am aclocal.m4
|
||||
automake --add-missing
|
||||
|
||||
TAGS:
|
||||
find . -name '*.[ch]' -print | etags -
|
||||
|
||||
483
Makefile.DOS.template
Normal file
483
Makefile.DOS.template
Normal file
@@ -0,0 +1,483 @@
|
||||
# -*-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 \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi check-local installcheck \
|
||||
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
|
||||
install-exec install-data install uninstall all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# --------------- 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:
|
||||
86
Makefile.am
86
Makefile.am
@@ -18,34 +18,20 @@ 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.
|
||||
#
|
||||
check-local:
|
||||
@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; \
|
||||
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
|
||||
MOSTLYCLEANFILES = loadavg.c
|
||||
CLEANFILES = loadavg
|
||||
|
||||
# --------------- Local DIST Section
|
||||
|
||||
# Install the w32 subdirectory
|
||||
#
|
||||
@@ -55,6 +41,56 @@ dist-hook:
|
||||
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) -I. -I$(srcdir) -DHAVE_CONFIG_H -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: all
|
||||
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
|
||||
|
||||
if MAINT_MAKEFILE
|
||||
# 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.
|
||||
|
||||
@@ -22,11 +22,6 @@
|
||||
# Makefile for GNU Make
|
||||
#
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
VPATH = /make-3.74/
|
||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
||||
srcdir = /make-3.74/
|
||||
|
||||
CC = sc
|
||||
RM = delete
|
||||
|
||||
@@ -250,7 +245,7 @@ clean: glob-clean
|
||||
-$(RM) make loadavg "#?.o" core make.dvi
|
||||
|
||||
distclean: clean glob-realclean
|
||||
-$(RM) Makefile config.h config.status build.sh stamp-config
|
||||
-$(RM) Makefile config.h config.status build.sh
|
||||
-$(RM) config.log config.cache
|
||||
-$(RM) TAGS tags
|
||||
-$(RM) make.?? make.??s make.log make.toc make.*aux
|
||||
|
||||
11
NEWS
11
NEWS
@@ -1,12 +1,16 @@
|
||||
GNU make NEWS -*-indented-text-*-
|
||||
History of user-visible changes.
|
||||
18 Aug 1997
|
||||
19 Sep 1997
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
See the end for copying conditions.
|
||||
|
||||
Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu.
|
||||
|
||||
Version 3.76.1
|
||||
|
||||
* Small (but serious) bug fix. Quick rollout to get into the GNU source CD.
|
||||
|
||||
Version 3.76
|
||||
|
||||
* GNU make now uses automake to control Makefile.in generation. This
|
||||
@@ -39,6 +43,9 @@ Version 3.76
|
||||
|
||||
* The $(strip) function now removes newlines as well as TABs and spaces.
|
||||
|
||||
* The $(shell) function now changes CRLF (\r\n) pairs to a space as well
|
||||
as newlines (\n).
|
||||
|
||||
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32).
|
||||
|
||||
* Eli Zaretskii has updated the port to 32-bit protected mode on MSDOS
|
||||
@@ -46,6 +53,8 @@ Version 3.76
|
||||
and utilities. See README.DOS for details, and direct all questions
|
||||
concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
|
||||
Delorie <dj@delorie.com>.
|
||||
|
||||
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||
|
||||
Version 3.75
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
||||
# `build_w32.bat' instead.
|
||||
#
|
||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -29,9 +29,9 @@ OUTDIR=.
|
||||
MAKEFILE=NMakefile
|
||||
SUBPROC_MAKEFILE=NMakefile
|
||||
|
||||
CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES
|
||||
CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES
|
||||
CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
|
||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||
|
||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
|
||||
@@ -55,13 +55,15 @@ w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib:
|
||||
config.h: config.h.W32
|
||||
copy $? $@
|
||||
|
||||
Release:
|
||||
Release:
|
||||
nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
|
||||
Debug:
|
||||
Debug:
|
||||
nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
|
||||
|
||||
clean:
|
||||
rmdir /s /q WinDebug WinRel
|
||||
rmdir /s /q w32\subproc\WinDebug w32\subproc\WinRel
|
||||
erase config.h
|
||||
|
||||
$(OUTDIR):
|
||||
if not exist .\$@\nul mkdir .\$@
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
7. The `clean' targets require Unix-style `rm' program.
|
||||
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 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
|
||||
|
||||
58
README.W32
58
README.W32
@@ -38,7 +38,7 @@ GNU make and sh.exe:
|
||||
|
||||
There are very few true ports of Bourne shell for NT right now.
|
||||
There is a version of GNU bash available from Cygnus gnu-win32
|
||||
porting effort. Other possibilites are to get the MKS version
|
||||
porting effort. Other possibilities are to get the MKS version
|
||||
of sh.exe or to build your own with a package like
|
||||
NutCracker (DataFocus) or Portage (Consensys).
|
||||
|
||||
@@ -46,6 +46,46 @@ GNU make and sh.exe:
|
||||
freely available. It may be available someday, but I am not in control
|
||||
of this decision nor do I influence it. Sorry!
|
||||
|
||||
GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
|
||||
|
||||
There is a caveat that should be noted with respect to handling
|
||||
single character pathnames on Windows systems. When colon is
|
||||
used in PATH variables, make tries to be smart about knowing when
|
||||
you are using colon as a separator versus colon as a drive
|
||||
letter. Unfortunately, something as simple as the string 'x:/'
|
||||
could be interpreted 2 ways: (x and /) or (x:/).
|
||||
|
||||
Make chooses to interpret a letter plus colon (e.g. x:/) as a
|
||||
drive letter pathname. If it is necessary to use single
|
||||
character directories in paths (VPATH, vpath, Path, PATH), the
|
||||
user must do one of two things:
|
||||
|
||||
a. Use semicolon as the separator to disambiguate colon. For
|
||||
example use 'x;/' if you want to say 'x' and '/' are
|
||||
separate components.
|
||||
|
||||
b. Qualify the directory name so that there is more than
|
||||
one character in the path(s) used. For example, none
|
||||
of these settings are ambiguous:
|
||||
|
||||
./x:./y
|
||||
/some/path/x:/some/path/y
|
||||
x:/some/path/x:x:/some/path/y
|
||||
|
||||
These caveats affect Windows systems only (Windows NT and
|
||||
Windows 95) and can be ignored for other platforms.
|
||||
|
||||
Please note that you are free to mix colon and semi-colon in the
|
||||
specification of paths. Make is able to figure out the intended
|
||||
result and convert the paths internally to the format needed
|
||||
when interacting with the operating system.
|
||||
|
||||
You are encouraged to use colon as the separator character.
|
||||
This should ease the pain of deciding how to handle various path
|
||||
problems which exist between platforms. If colon is used on
|
||||
both Unix and Windows systems, then no ifdef'ing will be
|
||||
necessary in the makefile source.
|
||||
|
||||
GNU make test suite:
|
||||
|
||||
I verified all functionality with a slightly modified version
|
||||
@@ -105,17 +145,17 @@ SAMBA/NTFS/VFAT:
|
||||
under VFAT. VFAT users may wish to be aware that this port
|
||||
of make does respect case sensitivity.
|
||||
|
||||
Version 3.76 contains some preliminary support for FAT.
|
||||
Make now tries to work around some difficulties with stat'ing of
|
||||
files and caching of filenames and directories internally.
|
||||
There is still a known problem with filenames sometimes being found
|
||||
to have modification dates in the future which cause make to
|
||||
complain about the file and exit (remake.c).
|
||||
Version 3.76 contains some preliminary support for FAT. Make
|
||||
now tries to work around some difficulties with stat'ing of
|
||||
files and caching of filenames and directories internally.
|
||||
There is still a known problem with filenames sometimes being
|
||||
found to have modification dates in the future which cause make
|
||||
to complain about the file and exit (remake.c).
|
||||
|
||||
Bug reports:
|
||||
|
||||
Please submit bugs via the normal bug reporting mechanism
|
||||
which is described in one of the texinfo files. If you don't
|
||||
have texinfo for Windows NT or Windows 95, these files are simple
|
||||
which is described in one of the Texinfo files. If you don't
|
||||
have Texinfo for Windows NT or Windows 95, these files are simple
|
||||
text files and can be read with a text editor.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This directory contains the %VERSION% test release of GNU Make.
|
||||
All bugs reported for previous test releases have been fixed.
|
||||
This directory contains the %VERSION% release of GNU Make.
|
||||
All bugs reported for previous releases have been fixed.
|
||||
Some bugs surely remain.
|
||||
|
||||
For general building and installation instructions, see the file INSTALL.
|
||||
@@ -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.
|
||||
|
||||
@@ -192,7 +192,7 @@ clean: glob-clean
|
||||
-$(RM) -f make loadavg *.o core make.dvi
|
||||
|
||||
distclean: clean glob-realclean
|
||||
-$(RM) -f Makefile config.h config.status build.sh stamp-config
|
||||
-$(RM) -f Makefile config.h config.status build.sh
|
||||
-$(RM) -f config.log config.cache
|
||||
-$(RM) -f TAGS tags
|
||||
-$(RM) -f make.?? make.??s make.log make.toc make.*aux
|
||||
|
||||
51
TODO.private
Normal file
51
TODO.private
Normal file
@@ -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.
|
||||
116
ar.c
116
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
|
||||
|
||||
static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, long int hdrpos,
|
||||
long int datapos, long int size, long int date, int uid, int gid, int mode, char *name));
|
||||
@@ -232,13 +129,12 @@ ar_member_date_1 (desc, mem, truncated,
|
||||
{
|
||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||
}
|
||||
#endif /* !VMS */
|
||||
|
||||
/* Set the archive-member NAME's modtime to now. */
|
||||
|
||||
#ifdef VMS
|
||||
int
|
||||
ar_touch (name)
|
||||
ar_touch (name)
|
||||
char *name;
|
||||
{
|
||||
error ("touch archive member is not available on VMS");
|
||||
|
||||
205
arscan.c
205
arscan.c
@@ -1,19 +1,19 @@
|
||||
/* Library function for scanning an archive file.
|
||||
Copyright (C) 1987, 89, 91, 92, 93, 94, 95 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987,89,91,92,93,94,95,97 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "make.h"
|
||||
|
||||
@@ -25,6 +25,171 @@
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
|
||||
#ifdef VMS
|
||||
#include <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 */
|
||||
|
||||
/* Return nonzero iff NAME matches MEM.
|
||||
If TRUNCATED is nonzero, MEM may be truncated to
|
||||
@@ -426,7 +592,7 @@ ar_name_equal (name, mem, truncated)
|
||||
}
|
||||
|
||||
#else /* AIX or APOLLO. */
|
||||
|
||||
#ifndef VMS
|
||||
if (truncated)
|
||||
{
|
||||
#ifdef AIAMAG
|
||||
@@ -435,7 +601,7 @@ ar_name_equal (name, mem, truncated)
|
||||
#else
|
||||
struct ar_hdr hdr;
|
||||
return !strncmp (name, mem,
|
||||
sizeof (hdr.ar_name) -
|
||||
sizeof (hdr.ar_name) -
|
||||
#if !defined (__hpux) && !defined (cray)
|
||||
1
|
||||
#else
|
||||
@@ -444,12 +610,14 @@ ar_name_equal (name, mem, truncated)
|
||||
);
|
||||
#endif
|
||||
}
|
||||
#endif /* !VMS */
|
||||
|
||||
return !strcmp (name, mem);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef VMS
|
||||
/* ARGSUSED */
|
||||
static long int
|
||||
ar_member_pos (desc, mem, truncated,
|
||||
@@ -532,6 +700,7 @@ ar_member_touch (arname, memname)
|
||||
errno = i;
|
||||
return -3;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
108
build_w32.bat
108
build_w32.bat
@@ -10,59 +10,59 @@ echo off
|
||||
echo "Creating GNU make for Windows 95/NT"
|
||||
echo on
|
||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c
|
||||
echo WinDebug\variable.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c
|
||||
echo WinDebug\rule.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c
|
||||
echo WinDebug\remote-stub.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c
|
||||
echo WinDebug\commands.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c
|
||||
echo WinDebug\file.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c
|
||||
echo WinDebug\getloadavg.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c
|
||||
echo WinDebug\default.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c
|
||||
echo WinDebug\signame.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c
|
||||
echo WinDebug\expand.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c
|
||||
echo WinDebug\dir.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c
|
||||
echo WinDebug\main.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c
|
||||
echo WinDebug\getopt1.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c
|
||||
echo WinDebug\job.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c
|
||||
echo WinDebug\read.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c
|
||||
echo WinDebug\version.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c
|
||||
echo WinDebug\getopt.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c
|
||||
echo WinDebug\arscan.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c
|
||||
echo WinDebug\remake.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c
|
||||
echo WinDebug\misc.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c
|
||||
echo WinDebug\ar.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c
|
||||
echo WinDebug\function.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c
|
||||
echo WinDebug\vpath.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c
|
||||
echo WinDebug\implicit.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c
|
||||
echo WinDebug\dirent.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c
|
||||
echo WinDebug\glob.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c
|
||||
echo WinDebug\fnmatch.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c
|
||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c
|
||||
echo WinDebug\pathstuff.obj >>link.dbg
|
||||
echo off
|
||||
echo "Linking WinDebug/%make%.exe"
|
||||
@@ -73,59 +73,59 @@ if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
|
||||
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
|
||||
if not exist .\WinRel\nul mkdir .\WinRel
|
||||
echo on
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c
|
||||
echo WinRel\variable.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c
|
||||
echo WinRel\rule.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c
|
||||
echo WinRel\remote-stub.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c
|
||||
echo WinRel\commands.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c
|
||||
echo WinRel\file.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c
|
||||
echo WinRel\getloadavg.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c
|
||||
echo WinRel\default.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c
|
||||
echo WinRel\signame.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c
|
||||
echo WinRel\expand.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c
|
||||
echo WinRel\dir.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c
|
||||
echo WinRel\main.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c
|
||||
echo WinRel\getopt1.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c
|
||||
echo WinRel\job.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c
|
||||
echo WinRel\read.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c
|
||||
echo WinRel\version.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c
|
||||
echo WinRel\getopt.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c
|
||||
echo WinRel\arscan.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c
|
||||
echo WinRel\remake.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c
|
||||
echo WinRel\misc.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c
|
||||
echo WinRel\ar.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c
|
||||
echo WinRel\function.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c
|
||||
echo WinRel\vpath.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c
|
||||
echo WinRel\implicit.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c
|
||||
echo WinRel\dirent.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c
|
||||
echo WinRel\glob.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c
|
||||
echo WinRel\fnmatch.obj >>link.rel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c
|
||||
echo WinRel\pathstuff.obj >>link.rel
|
||||
echo off
|
||||
echo "Linking WinRel/%make%.exe"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -162,6 +162,12 @@
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
#undef vfork
|
||||
|
||||
/* Name of this package (needed by automake) */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Version of this package (needed by automake) */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
/* Define to the name of the SCCS `get' command. */
|
||||
#define SCCS_GET "get"
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#define pid_t int
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
with this defined. */
|
||||
@@ -153,7 +153,7 @@
|
||||
/* #undef SYS_SIGLIST_DECLARED */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#define uid_t int
|
||||
/* #undef uid_t */
|
||||
|
||||
/* Define for Encore UMAX. */
|
||||
/* #undef UMAX */
|
||||
@@ -162,6 +162,12 @@
|
||||
instead of <sys/cpustats.h>. */
|
||||
/* #undef UMAX4_3 */
|
||||
|
||||
/* Name of this package (needed by automake) */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Version of this package (needed by automake) */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
/* #undef vfork */
|
||||
|
||||
|
||||
@@ -176,6 +176,12 @@
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
#undef vfork
|
||||
|
||||
/* Name of this package (needed by automake) */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Version of this package (needed by automake) */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
/* Define to the name of the SCCS `get' command. */
|
||||
#undef SCCS_GET
|
||||
#define SCCS_GET "echo no sccs get"
|
||||
|
||||
@@ -1,80 +1,24 @@
|
||||
/* Generated automatically from configure.in by autoheader. DO NOT EDIT! */
|
||||
|
||||
#define INCLUDEDIR "c:/djgpp/include"
|
||||
#define LIBDIR "c:/djgpp/lib"
|
||||
/* Many things are defined already by a system header. */
|
||||
#include <sys/config.h>
|
||||
|
||||
/* Define if you have dirent.h. */
|
||||
#define HAVE_DIRENT_H
|
||||
/* Name of this package (needed by automake) */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Define if you have the strcoll function and it is properly defined. */
|
||||
#define HAVE_STRCOLL
|
||||
|
||||
/* Define if you have unistd.h. */
|
||||
#define HAVE_UNISTD_H
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#ifndef STDC_HEADERS
|
||||
#define STDC_HEADERS
|
||||
#endif
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
#undef SYS_SIGLIST_DECLARED
|
||||
|
||||
/* Define if you have sys_siglist. */
|
||||
#undef HAVE_SYS_SIGLIST
|
||||
|
||||
/* Define if you have _sys_siglist. */
|
||||
#undef HAVE__SYS_SIGLIST
|
||||
|
||||
/* Define if you have psignal. */
|
||||
#define HAVE_PSIGNAL
|
||||
|
||||
/* Define if you have strsignal. */
|
||||
#undef HAVE_STRSIGNAL
|
||||
/* Version of this package (needed by automake) */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
/* Define NSIG. */
|
||||
#define NSIG SIGMAX
|
||||
|
||||
/* Define if you have getdtablesize. */
|
||||
#define HAVE_GETDTABLESIZE
|
||||
|
||||
/* Define if you have dup2. */
|
||||
#define HAVE_DUP2
|
||||
|
||||
/* Define if you have getcwd. */
|
||||
#define HAVE_GETCWD
|
||||
|
||||
/* Define if you have sigsetmask. */
|
||||
#define HAVE_SIGSETMASK
|
||||
|
||||
/* Define if you have setlinebuf. */
|
||||
#define HAVE_SETLINEBUF
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H
|
||||
#define HAVE_SIGSETMASK 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR
|
||||
|
||||
/* Define if you have the <sys/wait.h> header file. */
|
||||
#define HAVE_SYS_WAIT_H
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
#define SCCS_GET "get"
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
@echo off
|
||||
echo Configuring MAKE for DJGPP
|
||||
rem This batch file assumes a unix-type "sed" program
|
||||
|
||||
update configh.dos config.h
|
||||
rem The SmallEnv trick protects against too small environment block,
|
||||
rem in which case the values will be truncated and the whole thing
|
||||
rem goes awry. COMMAND.COM will say "Out of environment space", but
|
||||
rem many people don't care, so we force them to care by refusing to go.
|
||||
|
||||
rem Where is the srcdir?
|
||||
set XSRC=.
|
||||
if not "%XSRC%"=="." goto SmallEnv
|
||||
if "%1%"=="" goto SrcDone
|
||||
set XSRC=%1
|
||||
if not "%XSRC%"=="%1" goto SmallEnv
|
||||
|
||||
:SrcDone
|
||||
|
||||
update %XSRC%/configh.dos ./config.h
|
||||
|
||||
rem Do they have Make?
|
||||
redir -o junk.$$$ -eo make -n -f NUL
|
||||
@@ -15,69 +28,17 @@ if exist junk.$$$ del junk.$$$
|
||||
echo No Make program found--use DOSBUILD.BAT to build Make.
|
||||
goto End
|
||||
|
||||
rem They do have Make. Generate Makefiles.
|
||||
rem They do have Make. Generate the Makefile.
|
||||
|
||||
:MakeOk
|
||||
del junk.$$$
|
||||
echo # Makefile generated for DJGPP by "configure.bat"> Makefile
|
||||
|
||||
if exist config.sed del config.sed
|
||||
|
||||
echo ": try_sl ">> config.sed
|
||||
echo "/\\$/ { ">> config.sed
|
||||
echo " N ">> config.sed
|
||||
echo " s/[ ]*\\\n[ ]*/ / ">> config.sed
|
||||
echo " b try_sl ">> config.sed
|
||||
echo "} ">> config.sed
|
||||
|
||||
echo "s/@srcdir@/./ ">> config.sed
|
||||
echo "s/@exec_prefix@/$(DJDIR)/ ">> config.sed
|
||||
echo "s/@prefix@/$(DJDIR)/ ">> config.sed
|
||||
echo "s/@CC@/gcc/ ">> config.sed
|
||||
echo "s/@CFLAGS@/-O2 -g/ ">> config.sed
|
||||
if "%1"=="no-float" goto nofloat
|
||||
if "%1"=="NO-FLOAT" goto nofloat
|
||||
if "%1"=="NO_FLOAT" goto nofloat
|
||||
if "%1"=="no_float" goto nofloat
|
||||
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/ ">> config.sed
|
||||
goto floatdone
|
||||
:nofloat
|
||||
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -DNO_FLOAT/ ">> config.sed
|
||||
:floatdone
|
||||
echo "s/@LDFLAGS@// ">> config.sed
|
||||
echo "s/@RANLIB@/ranlib/ ">> config.sed
|
||||
echo "s/@DEFS@// ">> config.sed
|
||||
echo "s/@REMOTE@/stub/ ">> config.sed
|
||||
echo "s/@ALLOCA@// ">> config.sed
|
||||
echo "s/@LIBS@// ">> config.sed
|
||||
echo "s/@LIBOBJS@// ">> config.sed
|
||||
echo "s/@SET_MAKE@// ">> config.sed
|
||||
echo "s/@NEED_SETGID@/false/ ">> config.sed
|
||||
echo "s/@INSTALL_PROGRAM@/install/ ">> config.sed
|
||||
echo "s/@INSTALL_DATA@/install -m 644/ ">> config.sed
|
||||
echo "s/@INSTALL@/install/ ">> config.sed
|
||||
echo "s/^Makefile *:/_Makefile:/ ">> config.sed
|
||||
echo "s/^config.h *:/_config.h:/ ">> config.sed
|
||||
echo "s/^defines *=.*$/defines =/ ">> config.sed
|
||||
echo "/mv -f make.new make/d ">> config.sed
|
||||
|
||||
echo "s/cd glob; $(MAKE)/$(MAKE) -C glob/ ">> config.sed
|
||||
|
||||
echo "/^tagsrcs *=/s/\$(srcs)/$(srcs:.h.in=.h)/ ">> config.sed
|
||||
|
||||
echo "s/\*.o/*.o *.exe make.new/ ">> config.sed
|
||||
echo "s/\.info\*/.i*/g ">> config.sed
|
||||
|
||||
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
|
||||
if exist config2.sed goto SedOk
|
||||
echo To configure Make you need a Unix-style Sed program!
|
||||
update %XSRC%/Makefile.DOS ./Makefile
|
||||
echo Done.
|
||||
if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
|
||||
goto End
|
||||
:SedOk
|
||||
sed -f config2.sed Makefile.in >> Makefile
|
||||
del config.sed
|
||||
del config2.sed
|
||||
|
||||
cd glob
|
||||
call configure
|
||||
cd ..
|
||||
:SmallEnv
|
||||
echo Your environment is too small. Please enlarge it and run me again.
|
||||
|
||||
:End
|
||||
set XRSC=
|
||||
|
||||
@@ -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.76.1)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_SUBDIRS(glob)
|
||||
|
||||
@@ -45,7 +45,7 @@ changequote([,])dnl
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
||||
|
||||
AC_CHECK_FUNCS(memmove psignal mktemp \
|
||||
AC_CHECK_FUNCS(memmove psignal mktemp pstat_getdynamic \
|
||||
dup2 getcwd sigsetmask getgroups setlinebuf \
|
||||
seteuid setegid setreuid setregid strerror strsignal)
|
||||
AC_CHECK_SYMBOL(sys_siglist)
|
||||
@@ -114,10 +114,7 @@ if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
|
||||
fi
|
||||
rm -f s.conftest conftoast
|
||||
|
||||
AC_OUTPUT(Makefile build.sh, [
|
||||
# Makefile uses this timestamp file to know when to remake Makefile,
|
||||
# build.sh, and glob/Makefile.
|
||||
touch stamp-config])
|
||||
AC_OUTPUT(Makefile build.sh)
|
||||
|
||||
dnl Local Variables:
|
||||
dnl comment-start: "dnl "
|
||||
|
||||
7
dir.c
7
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;
|
||||
|
||||
11
file.c
11
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)
|
||||
|
||||
11
filedef.h
11
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. */
|
||||
|
||||
363
function.c
363
function.c
@@ -1,5 +1,5 @@
|
||||
/* Variable function expansion for GNU Make.
|
||||
Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -160,14 +160,14 @@ patsubst_expand (o, text, pattern, replace, pattern_percent, replace_percent)
|
||||
if (len < pattern_prepercent_len + pattern_postpercent_len)
|
||||
fail = 1;
|
||||
|
||||
/* Does the prefix match? */
|
||||
/* Does the prefix match? */
|
||||
if (!fail && pattern_prepercent_len > 0
|
||||
&& (*t != *pattern
|
||||
|| t[pattern_prepercent_len - 1] != pattern_percent[-1]
|
||||
|| strncmp (t + 1, pattern + 1, pattern_prepercent_len - 1)))
|
||||
fail = 1;
|
||||
|
||||
/* Does the suffix match? */
|
||||
/* Does the suffix match? */
|
||||
if (!fail && pattern_postpercent_len > 0
|
||||
&& (t[len - 1] != pattern_percent[pattern_postpercent_len]
|
||||
|| t[len - pattern_postpercent_len] != pattern_percent[1]
|
||||
@@ -318,12 +318,12 @@ int shell_function_pid = 0, shell_function_completed;
|
||||
The output is written into VARIABLE_BUFFER starting at O. */
|
||||
|
||||
/* Note this absorbs a semicolon and is safe to use in conditionals. */
|
||||
#define BADARGS(func) \
|
||||
if (reading_filename != 0) \
|
||||
makefile_fatal (reading_filename, *reading_lineno_ptr, \
|
||||
"insufficient arguments to function `%s'", \
|
||||
func); \
|
||||
else \
|
||||
#define BADARGS(func) \
|
||||
if (reading_filename != 0) \
|
||||
makefile_fatal (reading_filename, *reading_lineno_ptr, \
|
||||
"insufficient arguments to function `%s'", \
|
||||
func); \
|
||||
else \
|
||||
fatal ("insufficient arguments to function `%s'", func)
|
||||
|
||||
static char *
|
||||
@@ -349,12 +349,12 @@ expand_function (o, function, text, end)
|
||||
case function_shell:
|
||||
{
|
||||
#ifdef WINDOWS32
|
||||
SECURITY_ATTRIBUTES saAttr;
|
||||
HANDLE hIn;
|
||||
HANDLE hErr;
|
||||
HANDLE hChildOutRd;
|
||||
HANDLE hChildOutWr;
|
||||
HANDLE hProcess;
|
||||
SECURITY_ATTRIBUTES saAttr;
|
||||
HANDLE hIn;
|
||||
HANDLE hErr;
|
||||
HANDLE hChildOutRd;
|
||||
HANDLE hChildOutWr;
|
||||
HANDLE hProcess;
|
||||
#endif
|
||||
#ifdef __MSDOS__
|
||||
FILE *fpipe;
|
||||
@@ -380,7 +380,7 @@ expand_function (o, function, text, end)
|
||||
|
||||
#ifndef _AMIGA
|
||||
/* Using a target environment for `shell' loses in cases like:
|
||||
export var = $(shell echo foobie)
|
||||
export var = $(shell echo foobie)
|
||||
because target_environment hits a loop trying to expand $(var)
|
||||
to put it in the environment. This is even more confusing when
|
||||
var was not explicitly exported, but just appeared in the
|
||||
@@ -391,7 +391,7 @@ expand_function (o, function, text, end)
|
||||
/* Construct the environment. */
|
||||
envp = target_environment ((struct file *) 0);
|
||||
#endif
|
||||
#endif /* Not Amiga. */
|
||||
#endif /* Not Amiga. */
|
||||
|
||||
/* For error messages. */
|
||||
if (reading_filename != 0)
|
||||
@@ -405,111 +405,111 @@ expand_function (o, function, text, end)
|
||||
|
||||
#ifndef _AMIGA
|
||||
# ifdef WINDOWS32
|
||||
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
saAttr.bInheritHandle = TRUE;
|
||||
saAttr.lpSecurityDescriptor = NULL;
|
||||
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
saAttr.bInheritHandle = TRUE;
|
||||
saAttr.lpSecurityDescriptor = NULL;
|
||||
|
||||
if (DuplicateHandle(GetCurrentProcess(),
|
||||
GetStdHandle(STD_INPUT_HANDLE),
|
||||
GetCurrentProcess(),
|
||||
&hIn,
|
||||
0,
|
||||
TRUE,
|
||||
DUPLICATE_SAME_ACCESS) == FALSE) {
|
||||
fatal("create_child_process: DuplicateHandle(In) failed (e=%d)\n",
|
||||
GetLastError());
|
||||
}
|
||||
if (DuplicateHandle(GetCurrentProcess(),
|
||||
GetStdHandle(STD_ERROR_HANDLE),
|
||||
GetCurrentProcess(),
|
||||
&hErr,
|
||||
0,
|
||||
TRUE,
|
||||
DUPLICATE_SAME_ACCESS) == FALSE) {
|
||||
fatal("create_child_process: DuplicateHandle(Err) failed (e=%d)\n",
|
||||
GetLastError());
|
||||
}
|
||||
if (DuplicateHandle(GetCurrentProcess(),
|
||||
GetStdHandle(STD_INPUT_HANDLE),
|
||||
GetCurrentProcess(),
|
||||
&hIn,
|
||||
0,
|
||||
TRUE,
|
||||
DUPLICATE_SAME_ACCESS) == FALSE) {
|
||||
fatal("create_child_process: DuplicateHandle(In) failed (e=%d)\n",
|
||||
GetLastError());
|
||||
}
|
||||
if (DuplicateHandle(GetCurrentProcess(),
|
||||
GetStdHandle(STD_ERROR_HANDLE),
|
||||
GetCurrentProcess(),
|
||||
&hErr,
|
||||
0,
|
||||
TRUE,
|
||||
DUPLICATE_SAME_ACCESS) == FALSE) {
|
||||
fatal("create_child_process: DuplicateHandle(Err) failed (e=%d)\n",
|
||||
GetLastError());
|
||||
}
|
||||
|
||||
if (!CreatePipe(&hChildOutRd, &hChildOutWr, &saAttr, 0))
|
||||
fatal("CreatePipe() failed (e=%d)\n", GetLastError());
|
||||
if (!CreatePipe(&hChildOutRd, &hChildOutWr, &saAttr, 0))
|
||||
fatal("CreatePipe() failed (e=%d)\n", GetLastError());
|
||||
|
||||
hProcess = process_init_fd(hIn, hChildOutWr, hErr);
|
||||
hProcess = process_init_fd(hIn, hChildOutWr, hErr);
|
||||
|
||||
if (!hProcess)
|
||||
fatal("expand_function: process_init_fd() failed\n");
|
||||
else
|
||||
process_register(hProcess);
|
||||
if (!hProcess)
|
||||
fatal("expand_function: process_init_fd() failed\n");
|
||||
else
|
||||
process_register(hProcess);
|
||||
|
||||
/* make sure that CreateProcess() has Path it needs */
|
||||
sync_Path_environment();
|
||||
/* make sure that CreateProcess() has Path it needs */
|
||||
sync_Path_environment();
|
||||
|
||||
if (!process_begin(hProcess, argv, envp, argv[0], NULL))
|
||||
pid = (int) hProcess;
|
||||
else
|
||||
fatal("expand_function: unable to launch process (e=%d)\n",
|
||||
process_last_err(hProcess));
|
||||
if (!process_begin(hProcess, argv, envp, argv[0], NULL))
|
||||
pid = (int) hProcess;
|
||||
else
|
||||
fatal("expand_function: unable to launch process (e=%d)\n",
|
||||
process_last_err(hProcess));
|
||||
|
||||
/* set up to read data from child */
|
||||
pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY);
|
||||
/* set up to read data from child */
|
||||
pipedes[0] = _open_osfhandle((long) hChildOutRd, O_RDONLY);
|
||||
|
||||
/* this will be closed almost right away */
|
||||
pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND);
|
||||
/* this will be closed almost right away */
|
||||
pipedes[1] = _open_osfhandle((long) hChildOutWr, O_APPEND);
|
||||
# else /* WINDOWS32 */
|
||||
# ifdef __MSDOS__
|
||||
{
|
||||
/* MSDOS can't fork, but it has `popen'.
|
||||
(Bwt, why isn't `popen' used in all the versions?) */
|
||||
struct variable *sh = lookup_variable ("SHELL", 5);
|
||||
int e;
|
||||
extern int dos_command_running, dos_status;
|
||||
{
|
||||
/* MSDOS can't fork, but it has `popen'.
|
||||
(Bwt, why isn't `popen' used in all the versions?) */
|
||||
struct variable *sh = lookup_variable ("SHELL", 5);
|
||||
int e;
|
||||
extern int dos_command_running, dos_status;
|
||||
|
||||
/* Make sure not to bother processing an empty line. */
|
||||
while (isblank (*text))
|
||||
++text;
|
||||
if (*text == '\0')
|
||||
break;
|
||||
/* Make sure not to bother processing an empty line. */
|
||||
while (isblank (*text))
|
||||
++text;
|
||||
if (*text == '\0')
|
||||
break;
|
||||
|
||||
if (sh)
|
||||
{
|
||||
char buf[PATH_MAX + 7];
|
||||
/* This makes sure $SHELL value is used by $(shell), even
|
||||
though the target environment is not passed to it. */
|
||||
sprintf (buf, "SHELL=%s", sh->value);
|
||||
putenv (buf);
|
||||
}
|
||||
if (sh)
|
||||
{
|
||||
char buf[PATH_MAX + 7];
|
||||
/* This makes sure $SHELL value is used by $(shell), even
|
||||
though the target environment is not passed to it. */
|
||||
sprintf (buf, "SHELL=%s", sh->value);
|
||||
putenv (buf);
|
||||
}
|
||||
|
||||
e = errno;
|
||||
errno = 0;
|
||||
dos_command_running = 1;
|
||||
dos_status = 0;
|
||||
fpipe = popen (text, "rt");
|
||||
dos_command_running = 0;
|
||||
if (!fpipe || dos_status)
|
||||
{
|
||||
pipedes[0] = -1;
|
||||
pid = -1;
|
||||
if (dos_status)
|
||||
errno = EINTR;
|
||||
else if (errno == 0)
|
||||
errno = ENOMEM;
|
||||
shell_function_completed = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pipedes[0] = fileno (fpipe);
|
||||
pid = 42;
|
||||
errno = e;
|
||||
shell_function_completed = 1;
|
||||
}
|
||||
}
|
||||
if (pipedes[0] < 0)
|
||||
e = errno;
|
||||
errno = 0;
|
||||
dos_command_running = 1;
|
||||
dos_status = 0;
|
||||
fpipe = popen (text, "rt");
|
||||
dos_command_running = 0;
|
||||
if (!fpipe || dos_status)
|
||||
{
|
||||
pipedes[0] = -1;
|
||||
pid = -1;
|
||||
if (dos_status)
|
||||
errno = EINTR;
|
||||
else if (errno == 0)
|
||||
errno = ENOMEM;
|
||||
shell_function_completed = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pipedes[0] = fileno (fpipe);
|
||||
pid = 42;
|
||||
errno = e;
|
||||
shell_function_completed = 1;
|
||||
}
|
||||
}
|
||||
if (pipedes[0] < 0)
|
||||
# else /* ! __MSDOS__ */
|
||||
if (pipe (pipedes) < 0)
|
||||
if (pipe (pipedes) < 0)
|
||||
# endif /* __MSDOS__ */
|
||||
{
|
||||
perror_with_name (error_prefix, "pipe");
|
||||
break;
|
||||
}
|
||||
{
|
||||
perror_with_name (error_prefix, "pipe");
|
||||
break;
|
||||
}
|
||||
|
||||
# ifndef __MSDOS__
|
||||
pid = vfork ();
|
||||
@@ -606,28 +606,41 @@ expand_function (o, function, text, end)
|
||||
if (i > 0)
|
||||
{
|
||||
if (buffer[i - 1] == '\n')
|
||||
buffer[--i] = '\0';
|
||||
{
|
||||
if (i > 1 && buffer[i - 2] == '\r')
|
||||
--i;
|
||||
buffer[--i] = '\0';
|
||||
}
|
||||
else
|
||||
buffer[i] = '\0';
|
||||
|
||||
p = buffer;
|
||||
while ((p = index (p, '\n')) != 0)
|
||||
*p++ = ' ';
|
||||
for (p2=p; *p != '\0'; ++p)
|
||||
{
|
||||
if (p[0] == '\r' && p[1] == '\n')
|
||||
continue;
|
||||
if (*p == '\n')
|
||||
*p2++ = ' ';
|
||||
else
|
||||
*p2++ = *p;
|
||||
}
|
||||
*p2 = '\0';
|
||||
o = variable_buffer_output (o, buffer, i);
|
||||
}
|
||||
}
|
||||
|
||||
free (buffer);
|
||||
}
|
||||
#else /* Amiga */
|
||||
#else /* Amiga */
|
||||
{
|
||||
/* Amiga can't fork nor spawn, but I can start a program with
|
||||
redirection of my choice. However, this means that we
|
||||
redirection of my choice. However, this means that we
|
||||
don't have an opportunity to reopen stdout to trap it. Thus,
|
||||
we save our own stdout onto a new descriptor and dup a temp
|
||||
file's descriptor onto our stdout temporarily. After we
|
||||
spawn the shell program, we dup our own stdout back to the
|
||||
stdout descriptor. The buffer reading is the same as above,
|
||||
except that we're now reading from a file. */
|
||||
except that we're now reading from a file. */
|
||||
#include <dos/dos.h>
|
||||
#include <proto/dos.h>
|
||||
|
||||
@@ -699,7 +712,7 @@ expand_function (o, function, text, end)
|
||||
}
|
||||
free (buffer);
|
||||
}
|
||||
#endif /* Not Amiga. */
|
||||
#endif /* Not Amiga. */
|
||||
|
||||
free (text);
|
||||
break;
|
||||
@@ -1051,13 +1064,13 @@ expand_function (o, function, text, end)
|
||||
p2 = text;
|
||||
while (*p2 != '\0')
|
||||
{
|
||||
while (isspace(*p2))
|
||||
++p2;
|
||||
p = p2;
|
||||
for (i=0; *p2 != '\0' && !isspace(*p2); ++p2, ++i)
|
||||
{}
|
||||
if (!i)
|
||||
break;
|
||||
while (isspace(*p2))
|
||||
++p2;
|
||||
p = p2;
|
||||
for (i=0; *p2 != '\0' && !isspace(*p2); ++p2, ++i)
|
||||
{}
|
||||
if (!i)
|
||||
break;
|
||||
o = variable_buffer_output (o, p, i);
|
||||
o = variable_buffer_output (o, " ", 1);
|
||||
doneany = 1;
|
||||
@@ -1235,42 +1248,42 @@ index argument");
|
||||
|
||||
/* Check the next argument */
|
||||
for (p2 = p + 1; isblank(*p2); ++p2)
|
||||
{}
|
||||
{}
|
||||
count = 0;
|
||||
for (p = p2; p < end; ++p)
|
||||
{
|
||||
if (*p == startparen)
|
||||
++count;
|
||||
else if (*p == endparen)
|
||||
--count;
|
||||
else if (*p == ',' && count <= 0)
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (*p == startparen)
|
||||
++count;
|
||||
else if (*p == endparen)
|
||||
--count;
|
||||
else if (*p == ',' && count <= 0)
|
||||
break;
|
||||
}
|
||||
if (p == end)
|
||||
BADARGS ("wordlist");
|
||||
BADARGS ("wordlist");
|
||||
text = expand_argument (p2, p);
|
||||
|
||||
for (p2 = text; *p2 != '\0'; ++p2)
|
||||
if (*p2 < '0' || *p2 > '9')
|
||||
{
|
||||
if (reading_filename != 0)
|
||||
makefile_fatal (reading_filename, *reading_lineno_ptr,
|
||||
"non-numeric second argument to `wordlist' function");
|
||||
else
|
||||
fatal ("non-numeric second argument to `wordlist' function");
|
||||
}
|
||||
if (*p2 < '0' || *p2 > '9')
|
||||
{
|
||||
if (reading_filename != 0)
|
||||
makefile_fatal (reading_filename, *reading_lineno_ptr,
|
||||
"non-numeric second argument to `wordlist' function");
|
||||
else
|
||||
fatal ("non-numeric second argument to `wordlist' function");
|
||||
}
|
||||
j = (unsigned int)atoi(text);
|
||||
free (text);
|
||||
|
||||
if (j > i)
|
||||
j -= i;
|
||||
j -= i;
|
||||
else
|
||||
{
|
||||
unsigned int k;
|
||||
k = j;
|
||||
j = i - j;
|
||||
i = k;
|
||||
}
|
||||
{
|
||||
unsigned int k;
|
||||
k = j;
|
||||
j = i - j;
|
||||
i = k;
|
||||
}
|
||||
++j;
|
||||
|
||||
/* Extract the requested words */
|
||||
@@ -1278,13 +1291,13 @@ index argument");
|
||||
p2 = text;
|
||||
|
||||
while (((p = find_next_token (&p2, &len)) != 0) && --i)
|
||||
{}
|
||||
{}
|
||||
if (p)
|
||||
{
|
||||
while (--j && (find_next_token (&p2, &len) != 0))
|
||||
{}
|
||||
o = variable_buffer_output (o, p, p2 - p);
|
||||
}
|
||||
{
|
||||
while (--j && (find_next_token (&p2, &len) != 0))
|
||||
{}
|
||||
o = variable_buffer_output (o, p, p2 - p);
|
||||
}
|
||||
|
||||
free (text);
|
||||
break;
|
||||
@@ -1366,34 +1379,34 @@ index argument");
|
||||
p = p2 + len;
|
||||
#ifdef VMS
|
||||
while (p >= p2 && *p != ']'
|
||||
&& (function != function_basename || *p != '.'))
|
||||
&& (function != function_basename || *p != '.'))
|
||||
#else
|
||||
# ifdef __MSDOS__
|
||||
while (p >= p2 && *p != '/' && *p != '\\'
|
||||
&& (function != function_basename || *p != '.'))
|
||||
&& (function != function_basename || *p != '.'))
|
||||
# else
|
||||
while (p >= p2 && *p != '/'
|
||||
&& (function != function_basename || *p != '.'))
|
||||
&& (function != function_basename || *p != '.'))
|
||||
# endif
|
||||
#endif
|
||||
--p;
|
||||
if (p >= p2 && (function == function_dir))
|
||||
o = variable_buffer_output (o, p2, ++p - p2);
|
||||
else if (p >= p2 && (*p == '.'))
|
||||
o = variable_buffer_output (o, p2, p - p2);
|
||||
else if (p >= p2 && (*p == '.'))
|
||||
o = variable_buffer_output (o, p2, p - p2);
|
||||
#if defined(WINDOWS32) || defined(__MSDOS__)
|
||||
/* Handle the "d:foobar" case */
|
||||
else if (p2[0] && p2[1] == ':' && function == function_dir)
|
||||
o = variable_buffer_output (o, p2, 2);
|
||||
/* Handle the "d:foobar" case */
|
||||
else if (p2[0] && p2[1] == ':' && function == function_dir)
|
||||
o = variable_buffer_output (o, p2, 2);
|
||||
#endif
|
||||
else if (function == function_dir)
|
||||
#ifdef VMS
|
||||
o = variable_buffer_output (o, "[]", 2);
|
||||
o = variable_buffer_output (o, "[]", 2);
|
||||
#else
|
||||
#ifndef _AMIGA
|
||||
o = variable_buffer_output (o, "./", 2);
|
||||
o = variable_buffer_output (o, "./", 2);
|
||||
#else
|
||||
/* o = o */; /* Just a nop... */
|
||||
/* o = o */; /* Just a nop... */
|
||||
#endif /* AMIGA */
|
||||
#endif /* !VMS */
|
||||
else
|
||||
@@ -1421,32 +1434,32 @@ index argument");
|
||||
p = p2 + len;
|
||||
#ifdef VMS
|
||||
while (p >= p2 && *p != ']'
|
||||
&& (function != function_suffix || *p != '.'))
|
||||
&& (function != function_suffix || *p != '.'))
|
||||
#else
|
||||
# ifdef __MSDOS__
|
||||
while (p >= p2 && *p != '/' && *p != '\\'
|
||||
&& (function != function_suffix || *p != '.'))
|
||||
&& (function != function_suffix || *p != '.'))
|
||||
# else
|
||||
while (p >= p2 && *p != '/'
|
||||
&& (function != function_suffix || *p != '.'))
|
||||
&& (function != function_suffix || *p != '.'))
|
||||
# endif
|
||||
#endif
|
||||
--p;
|
||||
if (p >= p2)
|
||||
{
|
||||
if (function == function_notdir)
|
||||
++p;
|
||||
else if (*p != '.')
|
||||
continue;
|
||||
++p;
|
||||
else if (*p != '.')
|
||||
continue;
|
||||
o = variable_buffer_output (o, p, len - (p - p2));
|
||||
}
|
||||
#if defined(WINDOWS32) || defined(__MSDOS__)
|
||||
/* Handle the case of "d:foo/bar". */
|
||||
else if (function == function_notdir && p2[0] && p2[1] == ':')
|
||||
{
|
||||
p = p2 + 2;
|
||||
o = variable_buffer_output (o, p, len - (p - p2));
|
||||
}
|
||||
/* Handle the case of "d:foo/bar". */
|
||||
else if (function == function_notdir && p2[0] && p2[1] == ':')
|
||||
{
|
||||
p = p2 + 2;
|
||||
o = variable_buffer_output (o, p, len - (p - p2));
|
||||
}
|
||||
#endif
|
||||
else if (function == function_notdir)
|
||||
o = variable_buffer_output (o, p2, len);
|
||||
|
||||
32
getopt.c
32
getopt.c
@@ -6,23 +6,23 @@
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -79,7 +79,7 @@ USA. */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_WINDOWS32) && !defined (__CYGWIN32__)
|
||||
#if defined (WINDOWS32) && !defined (__CYGWIN32__)
|
||||
/* It's not Unix, really. See? Capital letters. */
|
||||
#include <windows.h>
|
||||
#define getpid() GetCurrentProcessId()
|
||||
@@ -276,7 +276,9 @@ store_args_and_env (int argc, char *const *argv)
|
||||
original_argc = argc;
|
||||
original_argv = argv;
|
||||
}
|
||||
# ifdef text_set_element
|
||||
text_set_element (__libc_subinit, store_args_and_env);
|
||||
# endif /* text_set_element */
|
||||
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
if (nonoption_flags_len > 0) \
|
||||
|
||||
60
glob/glob.h
60
glob/glob.h
@@ -1,8 +1,5 @@
|
||||
/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
@@ -27,17 +24,21 @@ extern "C"
|
||||
#endif
|
||||
|
||||
#undef __ptr_t
|
||||
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
|
||||
|| defined (WINDOWS32))
|
||||
#undef __P
|
||||
#define __P(protos) protos
|
||||
#define __ptr_t void *
|
||||
#if (defined __cplusplus || (defined __STDC__ && __STDC__) \
|
||||
|| defined WINDOWS32)
|
||||
# undef __P
|
||||
# define __P(protos) protos
|
||||
# define __ptr_t void *
|
||||
# if !defined __GNUC__ || __GNUC__ < 2
|
||||
# undef __const
|
||||
# define __const const
|
||||
# endif
|
||||
#else /* Not C++ or ANSI C. */
|
||||
#undef __P
|
||||
#define __P(protos) ()
|
||||
#undef const
|
||||
#define const
|
||||
#define __ptr_t char *
|
||||
# undef __P
|
||||
# define __P(protos) ()
|
||||
# undef __const
|
||||
# define __const
|
||||
# define __ptr_t char *
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
/* Bits set in the FLAGS argument to `glob'. */
|
||||
@@ -49,17 +50,22 @@ extern "C"
|
||||
#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */
|
||||
#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */
|
||||
#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */
|
||||
#define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
|
||||
|
||||
#if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE \
|
||||
|| defined _GNU_SOURCE)
|
||||
# define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */
|
||||
# define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
|
||||
# define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */
|
||||
# define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */
|
||||
# define GLOB_TILDE (1 <<12)/* Expand ~user and ~ to home directories. */
|
||||
# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
|
||||
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
|
||||
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
|
||||
GLOB_NOMAGIC|GLOB_TILDE)
|
||||
|
||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE) || defined (_GNU_SOURCE)
|
||||
#define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */
|
||||
#define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
|
||||
#define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */
|
||||
#define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */
|
||||
#define GLOB_TILDE (1 <<12)/* Expand ~user and ~ to home directories. */
|
||||
#else
|
||||
# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
|
||||
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
|
||||
GLOB_PERIOD)
|
||||
#endif
|
||||
|
||||
/* Error returns from `glob'. */
|
||||
@@ -74,7 +80,7 @@ extern "C"
|
||||
#endif
|
||||
|
||||
/* Structure describing a globbing run. */
|
||||
#if !defined (_AMIGA) && !defined (VMS) /* Buggy compiler. */
|
||||
#if !defined _AMIGA && !defined VMS /* Buggy compiler. */
|
||||
struct stat;
|
||||
#endif
|
||||
typedef struct
|
||||
@@ -88,9 +94,9 @@ typedef struct
|
||||
are used instead of the normal file access functions. */
|
||||
void (*gl_closedir) __P ((void *));
|
||||
struct dirent *(*gl_readdir) __P ((void *));
|
||||
__ptr_t (*gl_opendir) __P ((const char *));
|
||||
int (*gl_lstat) __P ((const char *, struct stat *));
|
||||
int (*gl_stat) __P ((const char *, struct stat *));
|
||||
__ptr_t (*gl_opendir) __P ((__const char *));
|
||||
int (*gl_lstat) __P ((__const char *, struct stat *));
|
||||
int (*gl_stat) __P ((__const char *, struct stat *));
|
||||
} glob_t;
|
||||
|
||||
/* Do glob searching for PATTERN, placing results in PGLOB.
|
||||
@@ -101,8 +107,8 @@ typedef struct
|
||||
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
|
||||
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
|
||||
Otherwise, `glob' returns zero. */
|
||||
extern int glob __P ((const char *__pattern, int __flags,
|
||||
int (*__errfunc) __P ((const char *, int)),
|
||||
extern int glob __P ((__const char *__pattern, int __flags,
|
||||
int (*__errfunc) __P ((__const char *, int)),
|
||||
glob_t *__pglob));
|
||||
|
||||
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
||||
|
||||
@@ -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
|
||||
|
||||
92
job.c
92
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,13 @@ 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 !defined(VMS) && !defined(_AMIGA)
|
||||
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)
|
||||
@@ -796,6 +801,7 @@ start_job_command (child)
|
||||
set_command_state (child->file, cs_running);
|
||||
goto next_command;
|
||||
}
|
||||
#endif /* !VMS && !_AMIGA */
|
||||
|
||||
/* Tell update_goal_chain that a command has been started on behalf of
|
||||
this target. It is important that this happens here and not in
|
||||
@@ -823,9 +829,7 @@ start_job_command (child)
|
||||
fflush (stderr);
|
||||
|
||||
#ifndef VMS
|
||||
#ifndef WINDOWS32
|
||||
#ifndef _AMIGA
|
||||
#ifndef __MSDOS__
|
||||
#if !defined(WINDOWS32) && !defined(_AMIGA) && !defined(__MSDOS__)
|
||||
|
||||
/* Set up a bad standard input that reads from a broken pipe. */
|
||||
|
||||
@@ -853,9 +857,7 @@ start_job_command (child)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !AMIGA */
|
||||
#endif /* !WINDOWS32 */
|
||||
#endif /* !__MSDOS__ */
|
||||
#endif /* !WINDOWS32 && !_AMIGA && !__MSDOS__ */
|
||||
|
||||
/* Decide whether to give this child the `good' standard input
|
||||
(one that points to the terminal or whatever), or the `bad' one
|
||||
@@ -865,7 +867,7 @@ start_job_command (child)
|
||||
if (child->good_stdin)
|
||||
good_stdin_used = 1;
|
||||
|
||||
#endif /* Not VMS */
|
||||
#endif /* !VMS */
|
||||
|
||||
child->deleted = 0;
|
||||
|
||||
@@ -1598,11 +1600,66 @@ exec_command (argv, envp)
|
||||
char **argv, **envp;
|
||||
{
|
||||
#ifdef VMS
|
||||
/* Run the program. */
|
||||
execve (argv[0], argv, envp);
|
||||
perror_with_name ("execve: ", argv[0]);
|
||||
_exit (EXIT_FAILURE);
|
||||
/* Run the program. */
|
||||
execve (argv[0], argv, envp);
|
||||
perror_with_name ("execve: ", argv[0]);
|
||||
_exit (EXIT_FAILURE);
|
||||
#else
|
||||
#ifdef WINDOWS32
|
||||
HANDLE hPID;
|
||||
HANDLE hWaitPID;
|
||||
int err = 0;
|
||||
int exit_code = EXIT_FAILURE;
|
||||
|
||||
/* make sure CreateProcess() has Path it needs */
|
||||
sync_Path_environment();
|
||||
|
||||
/* launch command */
|
||||
hPID = process_easy(argv, envp);
|
||||
|
||||
/* make sure launch ok */
|
||||
if (hPID == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
int i;
|
||||
fprintf(stderr,
|
||||
"process_easy() failed failed to launch process (e=%d)\n",
|
||||
process_last_err(hPID));
|
||||
for (i = 0; argv[i]; i++)
|
||||
fprintf(stderr, "%s ", argv[i]);
|
||||
fprintf(stderr, "\nCounted %d args in failed launch\n", i);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* wait and reap last child */
|
||||
while (hWaitPID = process_wait_for_any())
|
||||
{
|
||||
/* was an error found on this process? */
|
||||
err = process_last_err(hWaitPID);
|
||||
|
||||
/* get exit data */
|
||||
exit_code = process_exit_code(hWaitPID);
|
||||
|
||||
if (err)
|
||||
fprintf(stderr, "make (e=%d, rc=%d): %s",
|
||||
err, exit_code, map_windows32_error_to_string(err));
|
||||
|
||||
/* cleanup process */
|
||||
process_cleanup(hWaitPID);
|
||||
|
||||
/* expect to find only last pid, warn about other pids reaped */
|
||||
if (hWaitPID == hPID)
|
||||
break;
|
||||
else
|
||||
fprintf(stderr,
|
||||
"make reaped child pid %d, still waiting for pid %d\n",
|
||||
hWaitPID, hPID);
|
||||
}
|
||||
|
||||
/* return child's exit code as our exit code */
|
||||
exit(exit_code);
|
||||
|
||||
#else /* !WINDOWS32 */
|
||||
|
||||
/* Be the user, permanently. */
|
||||
child_access ();
|
||||
|
||||
@@ -1654,18 +1711,19 @@ exec_command (argv, envp)
|
||||
}
|
||||
|
||||
_exit (127);
|
||||
#endif /* !WINDOWS32 */
|
||||
#endif /* !VMS */
|
||||
}
|
||||
#else /* On Amiga */
|
||||
void exec_command (argv)
|
||||
char **argv;
|
||||
{
|
||||
MyExecute (argv);
|
||||
MyExecute (argv);
|
||||
}
|
||||
|
||||
void clean_tmp (void)
|
||||
{
|
||||
DeleteFile (amiga_bname);
|
||||
DeleteFile (amiga_bname);
|
||||
}
|
||||
|
||||
#endif /* On Amiga */
|
||||
@@ -1866,7 +1924,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')
|
||||
|
||||
6
main.c
6
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
|
||||
@@ -1256,7 +1256,7 @@ int main (int argc, char ** argv)
|
||||
time_t *makefile_mtimes = 0;
|
||||
unsigned int mm_idx = 0;
|
||||
char **nargv = argv;
|
||||
char nargc = argc;
|
||||
int nargc = argc;
|
||||
|
||||
if (debug_flag)
|
||||
puts ("Updating makefiles....");
|
||||
@@ -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\
|
||||
|
||||
@@ -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 's/%VERSION%/$(version)/' < $< > $@
|
||||
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 -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
|
||||
@@ -22,6 +40,18 @@ build.sh.in: build.template Makefile.am
|
||||
$< > $@
|
||||
chmod a-w+x $@
|
||||
|
||||
# We clean everything here. The GNU standards for makefile conventions say
|
||||
# you shouldn't remove configure, etc., but this makefile is only available
|
||||
# in a full development distribution, so they'll only be removed then.
|
||||
#
|
||||
# And _I_ want them to be removed ;)
|
||||
#
|
||||
maintFILES = configure aclocal.m4 config.h.in Makefile.in \
|
||||
stamp-h.in glob/stamp-h.in
|
||||
|
||||
MAINTAINERCLEANFILES = $(TEMPLATES) missing Makefile.DOS build.sh.in \
|
||||
$(maintFILES)
|
||||
|
||||
# Put the alpha distribution files up for anonymous FTP.
|
||||
#
|
||||
ALPHA := ~ftp/gnu
|
||||
|
||||
8
make.h
8
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>
|
||||
|
||||
48
make.texinfo
48
make.texinfo
@@ -9,9 +9,9 @@
|
||||
|
||||
@set RCSID $Id$
|
||||
@set EDITION 0.51
|
||||
@set VERSION 3.75 Beta
|
||||
@set UPDATED 9 May 1996
|
||||
@set UPDATE-MONTH May 1996
|
||||
@set VERSION 3.76 Beta
|
||||
@set UPDATED 26 Aug 1997
|
||||
@set UPDATE-MONTH Aug 1997
|
||||
@comment The ISBN number might need to change on next publication.
|
||||
@set ISBN 1-882114-78-7 @c CHANGE THIS BEFORE PRINTING AGAIN! --roland 9may96
|
||||
|
||||
@@ -73,7 +73,7 @@ by the Free Software Foundation.
|
||||
@author Richard M. Stallman and Roland McGrath
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94, '95, '96 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97 Free Software Foundation, Inc.
|
||||
@sp 2
|
||||
Published by the Free Software Foundation @*
|
||||
59 Temple Place -- Suite 330, @*
|
||||
@@ -5746,8 +5746,10 @@ The @code{shell} function performs the same function that backquotes
|
||||
(@samp{`}) perform in most shells: it does @dfn{command expansion}. This
|
||||
means that it takes an argument that is a shell command and returns the
|
||||
output of the command. The only processing @code{make} does on the result,
|
||||
before substituting it into the surrounding text, is to convert newlines to
|
||||
spaces.@refill
|
||||
before substituting it into the surrounding text, is to convert each
|
||||
newline or carriage-return / newline pair to a single space. It also
|
||||
removes the trailing (carriage-return and) newline, if it's the last
|
||||
thing in the result.@refill
|
||||
|
||||
The commands run by calls to the @code{shell} function are run when the
|
||||
function calls are expanded. In most cases, this is when the makefile is
|
||||
@@ -5856,18 +5858,34 @@ You can specify a different goal or goals with arguments to @code{make}.
|
||||
Use the name of the goal as an argument. If you specify several goals,
|
||||
@code{make} processes each of them in turn, in the order you name them.
|
||||
|
||||
@cindex @code{MAKECMDGOALS}
|
||||
@vindex MAKECMDGOALS
|
||||
@code{Make} will set the special variable @code{MAKECMDGOALS} to the
|
||||
list of goals you specified on the command line. If no goals were given
|
||||
on the command line, this variable is empty.
|
||||
|
||||
Any target in the makefile may be specified as a goal (unless it
|
||||
starts with @samp{-} or contains an @samp{=}, in which case it will be
|
||||
parsed as a switch or variable definition, respectively). Even
|
||||
targets not in the makefile may be specified, if @code{make} can find
|
||||
implicit rules that say how to make them.
|
||||
|
||||
@cindex @code{MAKECMDGOALS}
|
||||
@vindex MAKECMDGOALS
|
||||
@code{Make} will set the special variable @code{MAKECMDGOALS} to the
|
||||
list of goals you specified on the command line. If no goals were given
|
||||
on the command line, this variable is empty. Note that this variable
|
||||
should be used only in special circumstances.
|
||||
|
||||
An example of appropriate use is to avoid including @file{.d} files
|
||||
during @code{clean} rules (@pxref{Automatic Dependencies}), so
|
||||
@code{make} won't create them only to immediately remove them
|
||||
again:@refill
|
||||
|
||||
@example
|
||||
@group
|
||||
sources = foo.c bar.c
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
include $(sources:.c=.d)
|
||||
endif
|
||||
@end group
|
||||
@end example
|
||||
|
||||
One use of specifying a goal is if you want to compile only a part of
|
||||
the program, or only one of several programs. Specify as a goal each
|
||||
file that you wish to remake. For example, consider a directory containing
|
||||
@@ -8797,6 +8815,12 @@ The flags given to @code{make}. You can set this in the environment or
|
||||
a makefile to set flags.@*
|
||||
@xref{Options/Recursion, ,Communicating Options to a Sub-@code{make}}.
|
||||
|
||||
@item MAKECMDGOALS
|
||||
|
||||
The targets given to @code{make} on the command line. Setting this
|
||||
variable has no effect on the operation of @code{make}.@*
|
||||
@xref{Goals, ,Arguments to Specify the Goals}.
|
||||
|
||||
@item SUFFIXES
|
||||
|
||||
The default list of suffixes before @code{make} reads any makefiles.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
2
misc.c
2
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
|
||||
|
||||
11
read.c
11
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)
|
||||
{
|
||||
|
||||
18
readme.vms
18
readme.vms
@@ -1,21 +1,17 @@
|
||||
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:
|
||||
|
||||
Libraries are not supported. They were in GNU Make 3.60 but somehow I didn't
|
||||
care porting the code. If there is enough interest, I'll do it at some
|
||||
later time.
|
||||
|
||||
The variable $^ separates files with commas instead of spaces (It's the
|
||||
natural thing to do for VMS).
|
||||
|
||||
@@ -41,8 +37,6 @@ less than what vms provides. This might be a problem on the faster Alphas.
|
||||
You can use a : in a filename only if you preceed it with a backslash ('\').
|
||||
E.g.- hobbes\:[bogas.files]
|
||||
|
||||
None of the stuff in vpath.c has been implemented yet.
|
||||
|
||||
Make ignores success, informational, or warning errors (-S-, -I-, or -W-).
|
||||
But it will stop on -E- and -F- errors. (unless you do something to override
|
||||
this in your makefile, or whatever).
|
||||
|
||||
28
remake.c
28
remake.c
@@ -1,5 +1,5 @@
|
||||
/* Basic dependency engine for GNU Make.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -56,10 +56,6 @@ static int library_search PARAMS ((char **lib, time_t *mtime_ptr));
|
||||
|
||||
extern time_t f_mtime PARAMS ((struct file *file, int search));
|
||||
|
||||
#ifdef VMS
|
||||
extern int vms_stat PARAMS ((char *name, struct stat *buf));
|
||||
#endif
|
||||
|
||||
|
||||
/* Remake all the goals in the `struct dep' chain GOALS. Return -1 if nothing
|
||||
was done, 0 if all goals were updated successfully, or 1 if a goal failed.
|
||||
@@ -782,7 +778,7 @@ check_dep (file, depth, this_mtime, must_make_ptr)
|
||||
check_renamed (file);
|
||||
mtime = file_mtime (file);
|
||||
check_renamed (file);
|
||||
if (mtime > this_mtime)
|
||||
if (mtime != (time_t) -1 && mtime > this_mtime)
|
||||
*must_make_ptr = 1;
|
||||
/* Otherwise, update all non-intermediate files we depend on,
|
||||
if necessary, and see whether any of them is more
|
||||
@@ -1079,24 +1075,24 @@ f_mtime (file, search)
|
||||
We only need to do this once, for now. */
|
||||
|
||||
static time_t now = 0;
|
||||
if (!clock_skew_detected && mtime != -1 && mtime > now && ! file->updated)
|
||||
if (!clock_skew_detected
|
||||
&& mtime != (time_t)-1 && mtime > now
|
||||
&& !file->updated)
|
||||
{
|
||||
/* This file's time appears to be in the future.
|
||||
Update our concept of the present, and compare again. */
|
||||
#ifdef VMS
|
||||
/* Handle vms 64bit to 32bit time hack introduced in vms_stat ... */
|
||||
static unsigned long vms_now[2]; /* assumes 32 bit long ! */
|
||||
sys$gettim (vms_now);
|
||||
now = ((vms_now[0]>>24) & 0xff) + ((vms_now[1]<<8) & 0xffffff00);
|
||||
#else
|
||||
|
||||
extern time_t time ();
|
||||
time (&now);
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
/*
|
||||
* FAT filesystems round time to nearest even second(!). Just
|
||||
* allow for any file (NTFS or FAT) to perhaps suffer from this
|
||||
* braindamage.
|
||||
*
|
||||
* Apparently, this doesn't happen with the MS-DOS/DJGPP port,
|
||||
* although MS-DOS and MS-Windows 3.X/9X also use FAT filesystems.
|
||||
*/
|
||||
if (mtime > now && (((mtime % 2) == 0) && ((mtime-1) > now)))
|
||||
#else
|
||||
@@ -1131,11 +1127,7 @@ name_mtime (name)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
#ifdef VMS
|
||||
if (vms_stat (name, &st) < 0)
|
||||
#else
|
||||
if (stat (name, &st) < 0)
|
||||
#endif
|
||||
return (time_t) -1;
|
||||
|
||||
return (time_t) st.st_mtime;
|
||||
|
||||
@@ -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
|
||||
|
||||
2
vmsdir.h
2
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;
|
||||
|
||||
3
vmsify.c
3
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--;
|
||||
|
||||
43
vpath.c
43
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? */
|
||||
|
||||
@@ -90,7 +90,7 @@ closedir(DIR *pDir)
|
||||
struct dirent *
|
||||
readdir(DIR* pDir)
|
||||
{
|
||||
WINDOWS32_FIND_DATA wfdFindData;
|
||||
WIN32_FIND_DATA wfdFindData;
|
||||
|
||||
if (!pDir) {
|
||||
errno = EINVAL;
|
||||
|
||||
@@ -9,13 +9,6 @@
|
||||
* $Source$
|
||||
*
|
||||
* $Revision$
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* (C) COPYRIGHT TIVOLI Systems, Inc. 1991-1994
|
||||
* Unpublished Work
|
||||
* All Rights Reserved
|
||||
* Licensed Material - Property of TIVOLI Systems, Inc.
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
@@ -38,11 +38,15 @@ convert_Path_to_windows32(char *Path, char to_delim)
|
||||
if ((etok - p) == 1) {
|
||||
if (*(etok - 1) == ';' ||
|
||||
*(etok - 1) == ':') {
|
||||
etok[-1] = to_delim;
|
||||
etok[0] = to_delim;
|
||||
etok[-1] = to_delim;
|
||||
etok[0] = to_delim;
|
||||
p = ++etok;
|
||||
continue; /* ignore empty bucket */
|
||||
} else if (etok = strpbrk(etok+1, ":;")) {
|
||||
} else if (!isalpha(*p)) {
|
||||
/* found one to count, handle things like '.' */
|
||||
*etok = to_delim;
|
||||
p = ++etok;
|
||||
} else if ((*etok == ':') && (etok = strpbrk(etok+1, ":;"))) {
|
||||
/* found one to count, handle drive letter */
|
||||
*etok = to_delim;
|
||||
p = ++etok;
|
||||
@@ -55,11 +59,6 @@ convert_Path_to_windows32(char *Path, char to_delim)
|
||||
p = ++etok;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* convert to backward slashes */
|
||||
for (p = Path, p = strchr(p, '/'); p; p = strchr(p, '/'))
|
||||
*p = '\\';
|
||||
#endif
|
||||
return Path;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
||||
# `build.bat' instead.
|
||||
#
|
||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc
|
||||
# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -27,7 +27,7 @@ CC = cl
|
||||
OUTDIR=.
|
||||
MAKEFILE=NMakefile
|
||||
|
||||
CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WINDOWS32 /D _WINDOWS -I. -I../include
|
||||
CFLAGS_any = /nologo /MT /W3 /GX /Z7 /YX /D WIN32 /D WINDOWS32 /D _WINDOWS -I. -I../include
|
||||
CFLAGS_debug = $(CFLAGS_any) /Od /D _DEBUG /FR.\WinDebug\ /Fp.\WinDebug\subproc.pch /Fo.\WinDebug/
|
||||
CFLAGS_release = $(CFLAGS_any) /O2 /FR.\WinRel\ /Fp.\WinRel\subproc.pch /Fo.\WinRel/
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
||||
cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c
|
||||
cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c
|
||||
cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c
|
||||
cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c misc.c
|
||||
cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c sub_proc.c
|
||||
cl.exe /nologo /MT /W3 /GX /Z7 /YX /Od /I .. /I . /I ../include /D WIN32 /D WINDOWS32 /D _DEBUG /D _WINDOWS /FR.\WinDebug/ /Fp.\WinDebug/subproc.pch /Fo.\WinDebug/ /c w32err.c
|
||||
lib.exe /NOLOGO /OUT:.\WinDebug\subproc.lib .\WinDebug/misc.obj .\WinDebug/sub_proc.obj .\WinDebug/w32err.obj
|
||||
if not exist .\WinRel\nul mkdir .\WinRel
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c misc.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c sub_proc.c
|
||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I ../include /D WIN32 /D WINDOWS32 /D NDEBUG /D _WINDOWS /FR.\WinRel/ /Fp.\WinRel/subproc.pch /Fo.\WinRel/ /c w32err.c
|
||||
lib.exe /NOLOGO /OUT:.\WinRel\subproc.lib .\WinRel/misc.obj .\WinRel/sub_proc.obj .\WinRel/w32err.obj
|
||||
|
||||
@@ -319,14 +319,10 @@ find_file(char *exec_path, LPOFSTRUCT file_info)
|
||||
char *fname;
|
||||
char *ext;
|
||||
|
||||
if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info,
|
||||
OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {
|
||||
return(exec_handle);
|
||||
}
|
||||
|
||||
fname = malloc(strlen(exec_path) + 5);
|
||||
strcpy(fname, exec_path);
|
||||
ext = fname + strlen(fname);
|
||||
|
||||
strcpy(ext, ".exe");
|
||||
if ((exec_handle = (HANDLE)OpenFile(fname, file_info,
|
||||
OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {
|
||||
@@ -334,6 +330,13 @@ find_file(char *exec_path, LPOFSTRUCT file_info)
|
||||
return(exec_handle);
|
||||
}
|
||||
|
||||
strcpy(ext, ".cmd");
|
||||
if ((exec_handle = (HANDLE)OpenFile(fname, file_info,
|
||||
OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {
|
||||
free(fname);
|
||||
return(exec_handle);
|
||||
}
|
||||
|
||||
strcpy(ext, ".bat");
|
||||
if ((exec_handle = (HANDLE)OpenFile(fname, file_info,
|
||||
OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {
|
||||
@@ -341,6 +344,13 @@ find_file(char *exec_path, LPOFSTRUCT file_info)
|
||||
return(exec_handle);
|
||||
}
|
||||
|
||||
/* should .com come before this case? */
|
||||
if ((exec_handle = (HANDLE)OpenFile(exec_path, file_info,
|
||||
OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {
|
||||
free(fname);
|
||||
return(exec_handle);
|
||||
}
|
||||
|
||||
strcpy(ext, ".com");
|
||||
if ((exec_handle = (HANDLE)OpenFile(fname, file_info,
|
||||
OF_READ | OF_SHARE_COMPAT)) != (HANDLE)HFILE_ERROR) {
|
||||
@@ -489,14 +499,8 @@ process_begin(
|
||||
startInfo.hStdOutput = (HANDLE)pproc->sv_stdout[1];
|
||||
startInfo.hStdError = (HANDLE)pproc->sv_stderr[1];
|
||||
|
||||
/*
|
||||
* See if we need to setuid to a different user.
|
||||
*/
|
||||
if (as_user) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (as_user) {
|
||||
if (envblk) free(envblk);
|
||||
return -1;
|
||||
} else {
|
||||
if (CreateProcess(
|
||||
@@ -514,6 +518,7 @@ process_begin(
|
||||
pproc->last_err = GetLastError();
|
||||
pproc->lerrno = E_FORK;
|
||||
fprintf(stderr, "process_begin: CreateProcess(%s, %s, ...) failed.\n", exec_path, command_line);
|
||||
if (envblk) free(envblk);
|
||||
free( command_line );
|
||||
return(-1);
|
||||
}
|
||||
@@ -538,6 +543,7 @@ process_begin(
|
||||
}
|
||||
|
||||
free( command_line );
|
||||
if (envblk) free(envblk);
|
||||
pproc->lerrno=0;
|
||||
return 0;
|
||||
}
|
||||
@@ -1003,14 +1009,35 @@ make_command_line( char *shell_name, char *exec_path, char **argv)
|
||||
char** nargv;
|
||||
char* buf;
|
||||
int i;
|
||||
char** shargv = NULL;
|
||||
char* p = NULL;
|
||||
char* q = NULL;
|
||||
int j = 0;
|
||||
|
||||
if (shell_name) {
|
||||
/* handle things like: #!/bin/sh -x */
|
||||
|
||||
/* count tokens */
|
||||
q = strdup(shell_name);
|
||||
for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++);
|
||||
free(q);
|
||||
|
||||
/* copy tokens */
|
||||
q = strdup(shell_name);
|
||||
shargv = (char **) malloc((j+1) * sizeof (char *));
|
||||
for (j = 0, p = q; (p = strtok(p, " \t")) != NULL; p = NULL, j++)
|
||||
shargv[j] = strdup(p);
|
||||
shargv[j] = NULL;
|
||||
free(q);
|
||||
|
||||
/* create argv */
|
||||
for (i = 0; argv[i]; i++);
|
||||
i += 2;
|
||||
i += (j+1);
|
||||
nargv = (char **) malloc(i * sizeof (char *));
|
||||
nargv[0] = shell_name;
|
||||
for (i = 1; argv[i-1]; i++)
|
||||
nargv[i] = argv[i-1];
|
||||
for (i = 0; shargv[i] != NULL; i++)
|
||||
nargv[i] = shargv[i];
|
||||
for (j = 0; argv[j]; j++, i++)
|
||||
nargv[i] = argv[j];
|
||||
nargv[i] = NULL;
|
||||
} else
|
||||
nargv = argv;
|
||||
@@ -1018,8 +1045,12 @@ make_command_line( char *shell_name, char *exec_path, char **argv)
|
||||
/* create string suitable for CreateProcess() */
|
||||
buf = fix_command_line(nargv);
|
||||
|
||||
if (shell_name)
|
||||
if (shell_name) {
|
||||
for (j = 0; shargv[j]; j++)
|
||||
free(shargv[j]);
|
||||
free(shargv);
|
||||
free(nargv);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user