Compare commits

...

48 Commits
3.72 ... 3.72.5

Author SHA1 Message Date
Roland McGrath
016e1beef5 Check for mktemp. 1995-02-05 23:50:12 +00:00
Roland McGrath
21a8ec0d72 (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp. 1995-02-05 23:49:40 +00:00
Roland McGrath
fecd9e661a (make_cv_sysconf_open_max): New check for `sysconf (_SC_OPEN_MAX)'. 1995-02-05 23:45:49 +00:00
Roland McGrath
2914c705e5 Added #undef HAVE_SYSCONF_OPEN_MAX. 1995-02-05 23:36:04 +00:00
Roland McGrath
3f506aaf90 [HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro using sysconf. 1995-02-05 23:35:39 +00:00
Roland McGrath
75ea6c3ce2 (update_file_1): When !MUST_MAKE, don't set FILE->update_status to zero
before calling notice_finished_file.
(notice_finished_file): Touch only when FILE->update_status is zero.
(remake_file): Set FILE->update_status to zero after not calling
execute_file_command and deciding to touch instead.
1995-01-27 09:42:00 +00:00
Roland McGrath
3fb9ebf83f (debug_signal_handler): New function; toggles debug_flag.
(main): Handle SIGUSR1 with that.
1995-01-26 06:29:18 +00:00
Roland McGrath
b4890bdb1c (realclean): Remove Info files. 1995-01-16 20:46:50 +00:00
Roland McGrath
2cbfa1024a (variable_expand): Fix braino in last change. 1995-01-15 16:33:35 +00:00
Roland McGrath
258dad0f9a Fix nits in last change. 1995-01-15 16:32:10 +00:00
Roland McGrath
37358a9a82 (start_job_command): Save and restore environ around vfork call.
(search_path): Function #if 0'd out.
(exec_command): Use execvp instead of search_path.
1995-01-15 15:57:48 +00:00
Roland McGrath
e167e0a3c2 (variable_expand): Rewrote computed variable name and substitution
reference handling to be simpler.  First expand the entire text between the
parens if it contains any $s, then examine the result of that for
subtitution references and do no further expansion while parsing them.
1995-01-15 15:32:37 +00:00
Roland McGrath
7879457545 (construct_command_argv_internal): Handle " quoting too, when no
backslash, $ or ` characters appear inside the quotes.
1995-01-15 13:43:48 +00:00
Roland McGrath
d525f4dd72 (union wait check): If WEXITSTATUS and WTERMSIG are defined, just use int. 1995-01-15 13:23:03 +00:00
Roland McGrath
bd19554ea7 (Foreach Function): Correccion de gramatica espanola. 1995-01-13 06:30:39 +00:00
Roland McGrath
fffc384bfc (default_variables) [__hpux]: Remove special definition of ARFLAGS.
Existence of the `f' flag is not consistent across HPUX versions;
and one might be using GNU ar anyway.
1995-01-11 00:14:53 +00:00
Roland McGrath
afd1d69e7d (clean): Don't remove Info files. 1995-01-10 11:30:56 +00:00
Roland McGrath
c1305a1a18 ($(bindir)/make): Fix typo in echo. 1995-01-10 11:29:08 +00:00
Roland McGrath
43d5fbfc88 Fix typo in comment. 1995-01-10 11:28:12 +00:00
Roland McGrath
a4642a6a57 (check): Remove gratuitous target declaration. 1995-01-10 11:27:24 +00:00
Roland McGrath
11ca7f1ead (ETAGS, CTAGS): Don't use -t. 1995-01-07 16:59:15 +00:00
Roland McGrath
4aa992616f Include config.h first. 1995-01-07 16:57:36 +00:00
Roland McGrath
ab0fb2fa6f (ar_name_equal) [cray]: Subtract 1 like [__hpux]. 1995-01-07 16:55:30 +00:00
Roland McGrath
e1dd3bfa4a (decode_switches): For --help, print usage to stdout. 1995-01-07 16:38:08 +00:00
Richard M. Stallman
86238ec9d3 install, uninstall, installdirs should not alter the build dir. 1995-01-04 19:37:36 +00:00
Roland McGrath
2e9779fdb4 (update_file_1): Do set_command_state (FILE, cs_not_started) only if old
state was deps_running.
1994-12-05 17:42:13 +00:00
Roland McGrath
b61a13463d (start_waiting_job): Use set_command_state. 1994-11-29 01:10:47 +00:00
Roland McGrath
d3b9c35c8f (CPPFLAGS): New variable.
(prefix, exec_prefix): Set from @...@.
(compilation loop): Pass $CPPFLAGS to compiler.
1994-11-28 23:06:28 +00:00
Roland McGrath
c50b75b439 (build.sh.in): Make it executable. 1994-11-28 23:02:42 +00:00
Roland McGrath
7376280c33 (globfiles): Add configure.in, configure. 1994-11-28 22:02:23 +00:00
Roland McGrath
3c767901f6 (make-$(version).tar): Rename install.sh to install-sh. 1994-11-28 20:54:38 +00:00
Roland McGrath
c6dfff5f1b (prefix, exec_prefix): Set.
(CPPFLAGS): Filter out @...@.
($(ARCH)/glob/libglob.a): Don't pass down variables.
1994-11-28 20:51:40 +00:00
Roland McGrath
74540a1e91 Abbreviate copyright years. 1994-11-28 20:50:45 +00:00
Roland McGrath
5159db0aa4 (AC_OUTPUT): Don't write glob/Makefile. 1994-11-28 20:48:43 +00:00
Roland McGrath
e495d2380d (AC_CHECK_SYMBOL): Use AC_DEFINE_UNQUOTED. 1994-11-28 20:28:26 +00:00
Roland McGrath
1ed34a0118 Don't check for ranlib. 1994-11-28 20:20:43 +00:00
Roland McGrath
e8f64b2c88 (notice_finished_file): Only mark also_make's as updated if really ran
cmds.
1994-11-23 03:42:34 +00:00
Roland McGrath
4867409da2 Put dnls before random whitespace. 1994-11-15 11:32:39 +00:00
Roland McGrath
f801fc3521 (CPPFLAGS): New variable, set from @CPPFLAGS@.
(RANLIB): Variable removed.
(prefix, exec_prefix): Set these from @...@.
(.c.o): Use $(CPPFLAGS).
(glob/libglob.a): Don't pass down variables to sub-make.
glob/Makefile should be configured properly by configure.
(distclean): Remove config.log and config.cache (autoconf stuff).
1994-11-13 10:02:19 +00:00
David J. MacKenzie
b2c0446e71 Explain reason for new filesystem layout. 1994-11-11 04:33:24 +00:00
Roland McGrath
8f98ceb724 Add #undef HAVE_UNION_WAIT. 1994-11-08 02:09:49 +00:00
Roland McGrath
dea9990bc8 Converted to Autoconf v2. 1994-11-08 02:08:24 +00:00
Roland McGrath
e4c43aab3e Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H instead of DIRENT, SYSDIR,
NDIR.
1994-11-08 00:14:50 +00:00
Roland McGrath
e55ed78080 (prefix, exec_prefix): Set these from @...@.
(CPPFLAGS): New variable, set from @CPPFLAGS@.
(compiling loop): Pass $CPPFLAGS before $CFLAGS.
1994-11-07 23:42:58 +00:00
Roland McGrath
ca54a0b991 Initial revision 1994-11-07 23:40:44 +00:00
Roland McGrath
e25e2fb7f5 (define_makeflags): When no flags, set WORDS to zero. 1994-11-07 18:57:56 +00:00
Roland McGrath
1a886b6359 (define_makeflags): Terminate properly when FLAGSTRING is empty. 1994-11-06 23:33:55 +00:00
Roland McGrath
b511712f25 (rcs-mark-{alpha,beta}): Let make do the globbing instead of sh. 1994-11-04 21:08:52 +00:00
16 changed files with 431 additions and 299 deletions

View File

@@ -45,6 +45,8 @@ include compatMakefile
MAKE = $(MAKE_COMMAND) $(MAKEOVERRIDES)
# Remove autoconf magic.
prefix = /usr/local
exec_prefix = $(prefix)
extras := $(filter-out getloadavg.o @%@,$(extras)) getloadavg.o
LOADLIBES := $(filter-out @%@,$(LOADLIBES))
ALLOCA := $(filter-out @%@,$(ALLOCA))
@@ -86,7 +88,7 @@ GLOB =
else
CPPFLAGS := $(CPPFLAGS) -Iglob
CPPFLAGS := $(filter-out @%@,$(CPPFLAGS)) -Iglob
endif # works-for-make
endif # $(libc_dir)
@@ -96,9 +98,7 @@ endif # !no_libc
$(ARCH)/%.o: %.c
$(COMPILE.c) -Iglob $< $(OUTPUT_OPTION)
$(ARCH)/glob/libglob.a: FORCE
$(MAKE) -C $(@D) $(@F) \
CC='$(CC)' CFLAGS='$(CFLAGS) -I..' \
CPPFLAGS='$(CPPFLAGS) -DHAVE_CONFIG_H'
$(MAKE) -C $(@D) $(@F)
FORCE:
objs := $(addprefix $(ARCH)/,$(objs))
prog := $(ARCH)/make
@@ -147,7 +147,7 @@ $(prog): $(objs) $(globdep) #$(addprefix $(ARCH)/,gmalloc.o mcheck.o)
$(CC) $(LDFLAGS) $^ $(globlib) $(LOADLIBES) -o $@.new
mv -f $@.new $@
globfiles = $(addprefix glob/,COPYING.LIB Makefile.in \
globfiles = $(addprefix glob/,COPYING.LIB configure.in configure Makefile.in \
glob.c fnmatch.c glob.h fnmatch.h)
$(globfiles): stamp-glob ;
stamp-glob: /home/gd/gnu/libc/posix/glob.tar
@@ -197,6 +197,7 @@ build.sh.in: build.template compatMakefile
$(patsubst $(archpfx)%,%,$(objs)))\
$(patsubst %.c,%.o,$(filter %.c,$(globfiles)))@' \
$< > $@.new
chmod a+x $@.new
mv -f $@.new $@
# Make the distribution tar files.
@@ -218,8 +219,8 @@ dist-flavor = alpha
endif
.PHONY: rcs-mark rcs-mark-alpha rcs-mark-beta
rcs-mark: rcs-mark-$(dist-flavor)
rcs-mark-alpha:;rcs -sAlpha -Nmake-$(version-): RCS/[!=]*,v
rcs-mark-beta:;rcs -sBeta -Nmake-$(version-): RCS/[!=]*,v
rcs-mark-alpha: RCS/[!=]*,v;rcs -sAlpha -Nmake-$(version-): $^
rcs-mark-beta: RCS/[!=]*,v;rcs -sBeta -Nmake-$(version-): $^
version- = $(subst .,-,$(version))
dist: local-inst
@@ -262,7 +263,7 @@ make-$(version).tar: README INSTALL COPYING ChangeLog NEWS \
acconfig.h $(srcs) remote-*.c $(globfiles) \
make.texinfo make-stds.texi \
make.?? make.??s make.toc make.aux make.man texinfo.tex TAGS tags \
install.sh \
install-sh \
make.info make.info*
$(make-tar)

View File

@@ -9,3 +9,9 @@
/* Define this if the C library defines the variable `_sys_siglist'. */
#undef HAVE__SYS_SIGLIST
/* Define this if you have the `union wait' type in <sys/wait.h>. */
#undef HAVE_UNION_WAIT
/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */
#undef HAVE_SYSCONF_OPEN_MAX

View File

@@ -429,11 +429,11 @@ ar_name_equal (name, mem, truncated)
struct ar_hdr hdr;
return !strncmp (name, mem,
sizeof (hdr.ar_name) -
#ifndef __hpux
#if !defined (__hpux) && !defined (cray)
1
#else
2
#endif /* __hpux */
#endif /* !__hpux && !cray */
);
#endif
}

69
build.sh.in Normal file
View File

@@ -0,0 +1,69 @@
#!/bin/sh
# Shell script to build GNU Make in the absence of any `make' program.
# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Make is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Make; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# See Makefile.in for comments describing these variables.
srcdir='@srcdir@'
CC='@CC@'
CFLAGS='@CFLAGS@'
CPPFLAGS='@CPPFLAGS@'
LDFLAGS='@LDFLAGS@'
defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"'
ALLOCA='@ALLOCA@'
LOADLIBES='@LIBS@'
extras='@LIBOBJS@'
REMOTE='@REMOTE@'
# Common prefix for machine-independent installed files.
prefix=@prefix@
# Common prefix for machine-dependent installed files.
exec_prefix=@exec_prefix@
# Directory to find libraries in for `-lLIB'.
libdir=${exec_prefix}/lib
# Directory to search by default for included makefiles.
includedir=${prefix}/include
# Exit as soon as any command fails.
set -e
# These are all the objects we need to link together.
objs="commands.o job.o dir.o file.o misc.o main.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}"
# Compile the source files into those objects.
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
echo compiling ${file}...
$CC $CPPFLAGS $CFLAGS $defines -c \
-I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
done
# The object files were actually all put in the current directory.
# Remove the source directory names from the list.
srcobjs="$objs"
objs=
for obj in $srcobjs; do
objs="$objs `basename $obj`"
done
# Link all the objects together.
echo linking make...
$CC $LDFLAGS $objs $LOADLIBES -o make.new
echo done
mv -f make.new make

View File

@@ -1,8 +1,8 @@
#!/bin/sh
# Shell script to build GNU Make in the absence of any `make' program.
# @configure_input@
# Copyright (C) 1993 Free Software Foundation, Inc.
# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify
@@ -24,6 +24,7 @@
srcdir='@srcdir@'
CC='@CC@'
CFLAGS='@CFLAGS@'
CPPFLAGS='@CPPFLAGS@'
LDFLAGS='@LDFLAGS@'
defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"'
ALLOCA='@ALLOCA@'
@@ -32,9 +33,9 @@ extras='@LIBOBJS@'
REMOTE='@REMOTE@'
# Common prefix for machine-independent installed files.
prefix=/usr/local
prefix='@prefix@'
# Common prefix for machine-dependent installed files.
exec_prefix=/usr/local
exec_prefix='@exec_prefix@'
# Directory to find libraries in for `-lXXX'.
libdir=${exec_prefix}/lib
# Directory to search by default for included makefiles.
@@ -49,7 +50,8 @@ objs="%objs% remote-${REMOTE}.o ${extras} ${ALLOCA}"
# Compile the source files into those objects.
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
echo compiling ${file}...
$CC $CFLAGS $defines -c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
$CC $defines $CPPFLAGS $CFLAGS \
-c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
done
# The object files were actually all put in the current directory.

View File

@@ -1,7 +1,7 @@
# NOTE: If you have no `make' program at all to process this makefile, run
# `build.sh' instead.
#
# Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify
@@ -30,11 +30,9 @@ srcdir = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
# How to invoke ranlib. This is only used by the `glob' subdirectory.
RANLIB = @RANLIB@
# Define these for your system as follows:
# -DNO_ARCHIVES To disable `ar' archive support.
# -DNO_FLOAT To avoid using floating-point numbers.
@@ -77,9 +75,9 @@ LOADLIBES = @LIBS@
extras = @LIBOBJS@
# Common prefix for machine-independent installed files.
prefix = /usr/local
prefix = @prefix@
# Common prefix for machine-dependent installed files.
exec_prefix = $(prefix)
exec_prefix = @exec_prefix@
# Directory to install `make' in.
bindir = $(exec_prefix)/bin
@@ -119,8 +117,8 @@ MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
# Programs to make tags files.
ETAGS = etags -tw
CTAGS = ctags -tw
ETAGS = etags -w
CTAGS = ctags -w
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
rule.o implicit.o default.o variable.o expand.o function.o \
@@ -144,10 +142,9 @@ srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo
all: make
check: # No tests.
info: make.info
dvi: make.dvi
# Some makes apparently use .PHONY as the default goal is it is before `all'.
# Some makes apparently use .PHONY as the default goal if it is before `all'.
.PHONY: all check info dvi
make.info: make.texinfo
@@ -166,17 +163,14 @@ make: $(objs)
# -I. is needed to find config.h in the build directory.
.c.o:
$(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
$(CFLAGS) $< $(OUTPUT_OPTION)
$(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
# For some losing Unix makes.
SHELL = /bin/sh
MAKE = make
glob/libglob.a: FORCE config.h
cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' \
CPPFLAGS='$(CPPFLAGS) -DHAVE_CONFIG_H' \
RANLIB='$(RANLIB)' \
libglob.a
cd glob; $(MAKE) libglob.a
FORCE:
tagsrcs = $(srcs) $(srcdir)/remote-*.c
@@ -201,7 +195,7 @@ $(bindir)/$(binprefix)make: make
else \
echo "$@ needs to be owned by group $(group) and setgid;"; \
echo "otherwise the \`-l' option will probably not work."; \
echo "You may need special priveleges to install $@."; \
echo "You may need special privileges to install $@."; \
fi; \
else true; fi
# Some systems can't deal with renaming onto a running binary.
@@ -247,13 +241,15 @@ check: check-loadavg
.PHONY: clean realclean distclean mostlyclean
clean: glob-clean
-rm -f make loadavg *.o core make.info* make.dvi
-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 config.log config.cache
-rm -f TAGS tags
-rm -f make.?? make.??s make.log make.toc make.*aux
-rm -f loadavg.c
realclean: distclean
-rm -f make.info*
mostlyclean: clean
.PHONY: glob-clean glob-realclean

View File

@@ -1,78 +1,107 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION([$Id$])
AC_INIT(vpath.c) dnl A distinctive file to look for in srcdir.
AC_PREREQ(2.1)dnl dnl Minimum Autoconf version required.
AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir.
AC_CONFIG_HEADER(config.h)
AC_CONFIG_SUBDIRS(glob) dnl Run configure in glob subdirectory.
# We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS" && CFLAGS=-g AC_SUBST(CFLAGS)
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
AC_SET_MAKE
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_CPP dnl Later checks need this.
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_STDC_HEADERS
AC_DIR_HEADER
AC_UID_T dnl Also does gid_t.
AC_GETGROUPS_T
AC_PID_T
AC_RETSIGTYPE
AC_HAVE_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
sys/timeb.h)
AC_MINUS_C_MINUS_O
AC_CONST dnl getopt needs this.
AC_STAT_MACROS_BROKEN
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_TYPE_UID_T dnl Also does gid_t.
AC_TYPE_GETGROUPS
AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
sys/timeb.h)
AC_PROG_CC_C_O
AC_C_CONST dnl getopt needs this.
AC_HEADER_STAT
AC_SUBST(LIBOBJS)
AC_HAVE_FUNCS(getdtablesize psignal \
dup2 getcwd sigsetmask getgroups setlinebuf \
seteuid setegid setreuid setregid strerror)
AC_COMPILE_CHECK(sys_siglist, ,
[extern char *sys_siglist[]; puts(*sys_siglist);],
AC_DEFINE(HAVE_SYS_SIGLIST))
AC_COMPILE_CHECK(_sys_siglist, ,
[extern char *_sys_siglist[]; puts(*_sys_siglist);],
AC_DEFINE(HAVE__SYS_SIGLIST))
AC_ALLOCA
AC_VFORK
AC_SETVBUF_REVERSED
AC_GETLOADAVG
AC_STRCOLL
AC_DEFUN(AC_CHECK_SYMBOL, [dnl
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
if test "$ac_cv_check_symbol_$1" = yes; then
changequote(,)dnl
ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
changequote([,])dnl
AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
fi
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
dnl Check out the wait reality.
AC_HAVE_HEADERS(sys/wait.h) AC_HAVE_FUNCS(waitpid wait3)
AC_COMPILE_CHECK(union wait, [#include <sys/types.h>
AC_CHECK_FUNCS(getdtablesize psignal mktemp \
dup2 getcwd sigsetmask getgroups setlinebuf \
seteuid setegid setreuid setregid strerror)
AC_CHECK_SYMBOL(sys_siglist)
AC_CHECK_SYMBOL(_sys_siglist)
AC_FUNC_ALLOCA
AC_FUNC_VFORK
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_GETLOADAVG
AC_FUNC_STRCOLL
if test $ac_cv_func_getdtablesize = no; then
AC_MSG_CHECKING(for sysconf (_SC_OPEN_MAX))
AC_CACHE_VAL(make_cv_sysconf_open_max, [dnl
AC_TRY_LINK([#include <unistd.h>], [int max = sysconf (_SC_OPEN_MAX);],
[make_cv_sysconf_open_max=yes], [make_cv_sysconf_open_max=no])])
if test $make_cv_sysconf_open_max = yes; then
AC_DEFINE(HAVE_SYSCONF_OPEN_MAX)
fi
AC_MSG_RESULT($make_cv_sysconf_open_max)
fi
# Check out the wait reality.
AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3)
AC_MSG_CHECKING(for union wait)
AC_CACHE_VAL(make_cv_union_wait, [dnl
AC_TRY_LINK([#include <sys/types.h>
#include <sys/wait.h>],
[union wait status; int pid; pid = wait (&status);
[union wait status; int pid; pid = wait (&status);
#ifdef WEXITSTATUS
/* Some POSIXoid systems have both the new-style macros and the old
union wait type, and they do not work together. If union wait
conflicts with WEXITSTATUS et al, we don't want to use it at all. */
if (WEXITSTATUS (status) != 0) pid = -1;
#ifdef WTERMSIG
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
-- blow chunks here --
#endif
#endif
#ifdef HAVE_WAITPID
/* Make sure union wait works with waitpid. */
pid = waitpid (-1, &status, 0);
#endif
],
AC_DEFINE(HAVE_UNION_WAIT))
[make_cv_union_wait=yes], [make_cv_union_wait=no])])
if test "$make_cv_union_wait" = yes; then
AC_DEFINE(HAVE_UNION_WAIT)
fi
AC_MSG_RESULT($make_cv_union_wait)
AC_SYS_SIGLIST_DECLARED
AC_DECL_SYS_SIGLIST
# The presence of the following is not meant to imply
# that make necessarily works on those systems.
AC_DYNIX_SEQ
AC_XENIX_DIR
AC_IRIX_SUN
AC_CHECK_LIB(sun, getpwnam)
AC_SUBST(REMOTE) REMOTE=stub
AC_WITH(customs, [REMOTE=cstms
LIBS="$LIBS libcustoms.a"])
AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)],
[REMOTE=cstms LIBS="$LIBS libcustoms.a"])
echo checking for location of SCCS get command
if test -f /usr/sccs/get; then
@@ -94,7 +123,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 glob/Makefile, [
AC_OUTPUT(Makefile build.sh, [
# Makefile uses this timestamp file to know when to remake Makefile,
# build.sh, and glob/Makefile.
touch stamp-config])

View File

@@ -1,5 +1,5 @@
/* Data base of default implicit rules 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, 1995 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -209,13 +209,7 @@ static char *default_suffix_rules[] =
static char *default_variables[] =
{
"AR", "ar",
#ifndef __hpux
"ARFLAGS", "rv",
#else
/* HPUX ar's f flag says to truncate the file names to archive member
name length in comparisons, so replacement notices the equality. */
"ARFLAGS", "rfv",
#endif
"AS", "as",
#ifdef GCC_IS_NATIVE
"CC", "gcc",

18
dir.c
View File

@@ -18,26 +18,26 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "make.h"
#if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__)
#if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
#include <dirent.h>
#ifndef __GNU_LIBRARY__
#define D_NAMLEN(d) strlen((d)->d_name)
#else /* GNU C library. */
#define D_NAMLEN(d) ((d)->d_namlen)
#endif /* Not GNU C library. */
#else /* Not POSIX or DIRENT. */
#else /* Not POSIX or HAVE_DIRENT_H. */
#define direct dirent
#define D_NAMLEN(d) ((d)->d_namlen)
#ifdef SYSNDIR
#ifdef HAVE_SYS_NDIR_H
#include <sys/ndir.h>
#endif /* SYSNDIR */
#ifdef SYSDIR
#endif /* HAVE_SYS_NDIR_H */
#ifdef HAVE_SYS_DIR_H
#include <sys/dir.h>
#endif /* SYSDIR */
#ifdef NDIR
#endif /* HAVE_SYS_DIR_H */
#ifdef HAVE_NDIR_H
#include <ndir.h>
#endif /* NDIR */
#endif /* POSIX or DIRENT or __GNU_LIBRARY__. */
#endif /* HAVE_NDIR_H */
#endif /* POSIX or HAVE_DIRENT_H or __GNU_LIBRARY__. */
#if defined (POSIX) && !defined (__GNU_LIBRARY__)
/* Posix does not require that the d_ino field be present, and some

206
expand.c
View File

@@ -1,5 +1,5 @@
/* Variable expansion functions for GNU Make.
Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1988, 89, 91, 92, 93, 95 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -197,9 +197,9 @@ variable_expand (line)
char openparen = *p;
char closeparen = (openparen == '(') ? ')' : '}';
register char *beg = p + 1;
int free_beg = 0;
char *op, *begp;
char *end;
char *colon = 0;
char *end, *colon;
op = o;
begp = p;
@@ -213,10 +213,18 @@ variable_expand (line)
/* Is there a variable reference inside the parens or braces?
If so, expand it before expanding the entire reference. */
p1 = index (beg, closeparen);
end = index (beg, closeparen);
if (end == 0)
{
/* Unterminated variable reference. */
if (reading_filename != 0)
makefile_fatal (reading_filename, *reading_lineno_ptr,
"unterminated variable reference");
else
fatal ("unterminated variable reference");
}
p1 = lindex (beg, end, '$');
if (p1 != 0)
p1 = lindex (beg, p1, '$');
if (p1 != 0 && lindex (beg, p1, ':') == 0)
{
/* BEG now points past the opening paren or brace.
Count parens or braces until it is matched. */
@@ -227,133 +235,107 @@ variable_expand (line)
++count;
else if (*p == closeparen && --count < 0)
break;
else if (colon == 0 && count == 0 && *p == ':')
/* Record where we found a colon, which
indicates a substitution reference.
We want to expand the text before the
reference only. */
colon = p;
}
/* If COUNT is >= 0, there were unmatched opening parens
or braces, so we go to the simple case of a variable name
such as `$($(a)'. */
if (count < 0)
{
char *name = expand_argument (beg, colon == 0 ? p : colon);
unsigned int namelen = strlen (name);
if (colon == 0)
{
/* This is a simple reference to the expanded name. */
o = reference_variable (o, name, namelen);
free (name);
break;
}
else
{
/* This is a substitution reference to the expanded
name. We replace the pending text with a copy
containing the expanded name in place of the
original name, and then fall through to
the normal substitution reference code below. */
unsigned int restlen = strlen (colon) + 1;
beg = (char *) alloca (namelen + restlen);
bcopy (name, beg, namelen);
bcopy (colon, &beg[namelen], restlen);
/* Point COLON into the new copy. */
colon = &beg[namelen];
}
beg = expand_argument (beg, p); /* Expand the name. */
free_beg = 1; /* Remember to free BEG when finished. */
end = index (beg, '\0');
}
}
else
/* Advance P to the end of this reference. After we are
finished expanding this one, P will be incremented to
continue the scan. */
p = end;
/* This is not a reference to a built-in function and
it does not contain any variable references inside.
There are several things it could be. */
any variable references inside are now expanded.
Is the resultant text a substitution reference? */
if (colon == 0)
colon = index (beg, ':');
if (colon != 0 && lindex (beg, colon, closeparen) == 0)
colon = lindex (beg, end, ':');
if (colon != 0)
{
/* This is a substitution reference: $(FOO:A=B). */
int count;
/* This looks like a substitution reference: $(FOO:A=B). */
char *subst_beg, *subst_end, *replace_beg, *replace_end;
v = lookup_variable (beg, colon - beg);
if (v == 0)
warn_undefined (beg, colon - beg);
subst_beg = colon + 1;
count = 0;
for (p = subst_beg; *p != '\0'; ++p)
subst_end = index (subst_beg, '=');
if (subst_end == 0)
/* There is no = in sight. Punt on the substitution
reference and treat this as a variable name containing
a colon, in the code below. */
colon = 0;
else
{
if (*p == openparen)
++count;
else if (*p == closeparen)
--count;
else if (*p == '=' && count <= 0)
break;
replace_beg = subst_end + 1;
replace_end = end;
/* Extract the variable name before the colon
and look up that variable. */
v = lookup_variable (beg, colon - beg);
if (v == 0)
warn_undefined (beg, colon - beg);
if (v != 0 && *v->value != '\0')
{
char *value = (v->recursive ? recursively_expand (v)
: v->value);
char *pattern, *percent;
if (free_beg)
{
*subst_end = '\0';
pattern = subst_beg;
}
else
{
pattern = alloca (subst_end - subst_beg + 1);
bcopy (subst_beg, pattern, subst_end - subst_beg);
pattern[subst_end - subst_beg] = '\0';
}
percent = find_percent (pattern);
if (percent != 0)
{
char *replace;
if (free_beg)
{
*replace_end = '\0';
replace = replace_beg;
}
else
{
replace = alloca (replace_end - replace_beg
+ 1);
bcopy (replace_beg, replace,
replace_end - replace_beg);
replace[replace_end - replace_beg] = '\0';
}
o = patsubst_expand (o, value, pattern, replace,
percent, (char *) 0);
}
else
o = subst_expand (o, value,
pattern, replace_beg,
strlen (pattern),
end - replace_beg,
0, 1);
if (v->recursive)
free (value);
}
}
if (count > 0)
/* There were unmatched opening parens. */
return initialize_variable_output ();
subst_end = p;
replace_beg = p + 1;
count = 0;
for (p = replace_beg; *p != '\0'; ++p)
{
if (*p == openparen)
++count;
else if (*p == closeparen && --count < 0)
break;
}
if (count > 0)
/* There were unmatched opening parens. */
return initialize_variable_output ();
end = p;
replace_end = p;
p = expand_argument (subst_beg, subst_end);
p1 = expand_argument (replace_beg, replace_end);
if (v != 0 && *v->value != '\0')
{
char *value = (v->recursive ? recursively_expand (v)
: v->value);
char *percent = find_percent (p);
if (percent != 0)
o = patsubst_expand (o, value, p, p1,
percent, (char *) 0);
else
o = subst_expand (o, value,
p, p1, strlen (p), strlen (p1),
0, 1);
if (v->recursive)
free (value);
}
free (p);
free (p1);
}
/* No, this must be an ordinary variable reference. */
else
{
/* Look up the value of the variable. */
end = index (beg, closeparen);
if (end == 0)
{
/* Unterminated variable reference. */
if (reading_filename != 0)
makefile_fatal (reading_filename, *reading_lineno_ptr,
"unterminated variable reference");
else
fatal ("unterminated variable reference");
}
if (colon == 0)
/* This is an ordinary variable reference.
Look up the value of the variable. */
o = reference_variable (o, beg, end - beg);
}
/* Advance p past the variable reference to resume scan. */
p = end;
if (free_beg)
free (beg);
}
break;

View File

@@ -1,5 +1,5 @@
/* Get the system load averages.
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -59,6 +59,11 @@
We also #define LDAV_PRIVILEGED if a program will require
special installation to be able to call getloadavg. */
/* This should always be first. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/types.h>
/* Both the Emacs and non-Emacs sections want this. Some
@@ -69,10 +74,6 @@
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* Exclude all the code except the test program at the end
if the system has its own `getloadavg' function.

150
job.c
View File

@@ -1,5 +1,5 @@
/* Job execution and handling 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, 1995 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -23,9 +23,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "variable.h"
#include <assert.h>
/* Default path to search for executables. */
static char default_path[] = ":/bin:/usr/bin";
/* Default shell to use. */
char default_shell[] = "/bin/sh";
@@ -125,6 +122,9 @@ extern int setgid (), getgid ();
#ifdef HAVE_GETDTABLESIZE
extern int getdtablesize ();
#else
#ifdef HAVE_SYSCONF_OPEN_MAX
#define getdtablesize() ((int) sysconf (_SC_OPEN_MAX))
#else
#include <sys/param.h>
#define getdtablesize() NOFILE
#if !defined (NOFILE) && defined (NOFILES_MAX)
@@ -133,6 +133,7 @@ extern int getdtablesize ();
#endif
#endif
#endif
#endif
extern int getloadavg ();
extern int start_remote_job_p ();
@@ -689,6 +690,8 @@ start_job_command (child)
{
/* Fork the child process. */
char **parent_environ;
#ifdef POSIX
(void) sigprocmask (SIG_BLOCK, &fatal_signal_set, (sigset_t *) 0);
#else
@@ -698,7 +701,9 @@ start_job_command (child)
#endif
child->remote = 0;
parent_environ = environ;
child->pid = vfork ();
environ = parent_environ; /* Restore value child may have clobbered. */
if (child->pid == 0)
{
/* We are the child side. */
@@ -768,7 +773,7 @@ start_waiting_job (c)
{
/* Put this child on the chain of children waiting
for the load average to go down. */
c->file->command_state = cs_running;
set_command_state (c->file, cs_running);
c->next = waiting_jobs;
waiting_jobs = c;
return 0;
@@ -1073,6 +1078,11 @@ child_execute_job (stdin_fd, stdout_fd, argv, envp)
exec_command (argv, envp);
}
#if 0
/* Default path to search for executables. */
static char default_path[] = ":/bin:/usr/bin";
/* Search PATH for FILE.
If successful, store the full pathname in PROGRAM and return 1.
If not sucessful, return zero. */
@@ -1171,6 +1181,7 @@ search_path (file, path, program)
return 0;
}
#endif /* search_path commented out */
/* Replace the current process with one running the command in ARGV,
with environment ENVP. This function does not return. */
@@ -1179,82 +1190,65 @@ void
exec_command (argv, envp)
char **argv, **envp;
{
char *shell, *path;
PATH_VAR (program);
register char **ep;
shell = path = 0;
for (ep = envp; *ep != 0; ++ep)
{
if (shell == 0 && !strncmp(*ep, "SHELL=", 6))
shell = &(*ep)[6];
else if (path == 0 && !strncmp(*ep, "PATH=", 5))
path = &(*ep)[5];
else if (path != 0 && shell != 0)
break;
}
/* Be the user, permanently. */
child_access ();
if (!search_path (argv[0], path, program))
error ("%s: Command not found", argv[0]);
else
/* Run the program. */
environ = envp;
execvp (argv[0], argv);
switch (errno)
{
/* Run the program. */
execve (program, argv, envp);
case ENOENT:
error ("%s: Command not found", argv[0]);
break;
case ENOEXEC:
{
/* The file is not executable. Try it as a shell script. */
extern char *getenv ();
char *shell;
char **new_argv;
int argc;
if (errno == ENOEXEC)
{
PATH_VAR (shell_program);
char *shell_path;
if (shell == 0)
shell_path = default_shell;
else
{
if (search_path (shell, path, shell_program))
shell_path = shell_program;
else
{
shell_path = 0;
error ("%s: Shell program not found", shell);
}
}
shell = getenv ("SHELL");
if (shell == 0)
shell = default_shell;
if (shell_path != 0)
{
char **new_argv;
int argc;
argc = 1;
while (argv[argc] != 0)
++argc;
argc = 1;
while (argv[argc] != 0)
++argc;
new_argv = (char **) alloca ((1 + argc + 1) * sizeof (char *));
new_argv[0] = shell;
new_argv[1] = program;
while (argc > 0)
{
new_argv[1 + argc] = argv[argc];
--argc;
}
new_argv = (char **) alloca ((1 + argc + 1) * sizeof (char *));
new_argv[0] = shell_path;
new_argv[1] = program;
while (argc > 0)
{
new_argv[1 + argc] = argv[argc];
--argc;
}
execvp (shell, new_argv);
if (errno == ENOENT)
error ("%s: Shell program not found", shell);
else
perror_with_name ("execvp: ", shell);
break;
}
execve (shell_path, new_argv, envp);
perror_with_name ("execve: ", shell_path);
}
}
else
perror_with_name ("execve: ", program);
default:
perror_with_name ("execvp: ", argv[0]);
break;
}
_exit (127);
}
/* Figure out the argument list necessary to run LINE as a command.
Try to avoid using a shell. This routine handles only ' quoting.
Starting quotes may be escaped with a backslash. If any of the
characters in sh_chars[] is seen, or any of the builtin commands
listed in sh_cmds[] is the first word of a line, the shell is used.
/* Figure out the argument list necessary to run LINE as a command. Try to
avoid using a shell. This routine handles only ' quoting, and " quoting
when no backslash, $ or ` characters are seen in the quotes. Starting
quotes may be escaped with a backslash. If any of the characters in
sh_chars[] is seen, or any of the builtin commands listed in sh_cmds[]
is the first word of a line, the shell is used.
If RESTP is not NULL, *RESTP is set to point to the first newline in LINE.
If *RESTP is NULL, newlines will be ignored.
@@ -1332,7 +1326,7 @@ construct_command_argv_internal (line, restp, shell, ifs)
string_char:
/* Inside a string, just copy any char except a closing quote
or a backslash-newline combination. */
if (*p == '\'')
if (*p == instring)
instring = 0;
else if (*p == '\\' && p[1] == '\n')
goto swallow_escaped_newline;
@@ -1342,6 +1336,10 @@ construct_command_argv_internal (line, restp, shell, ifs)
*restp = p;
goto end_of_line;
}
/* Backslash, $, and ` are special inside double quotes.
If we see any of those, punt. */
else if (instring == '"' && index ("\\$`", *p) != 0)
goto slow;
else
*ap++ = *p;
}
@@ -1399,7 +1397,8 @@ construct_command_argv_internal (line, restp, shell, ifs)
break;
case '\'':
instring = 1;
case '"':
instring = *p;
break;
case '\n':
@@ -1564,7 +1563,7 @@ construct_command_argv_internal (line, restp, shell, ifs)
continue;
}
if (*p == '\\' || *p == '\''
if (*p == '\\' || *p == '\'' || *p == '"'
|| isspace (*p)
|| index (sh_chars, *p) != 0)
*ap++ = '\\';
@@ -1580,11 +1579,12 @@ construct_command_argv_internal (line, restp, shell, ifs)
return new_argv;
}
/* Figure out the argument list necessary to run LINE as a command.
Try to avoid using a shell. This routine handles only ' quoting.
Starting quotes may be escaped with a backslash. If any of the
characters in sh_chars[] is seen, or any of the builtin commands
listed in sh_cmds[] is the first word of a line, the shell is used.
/* Figure out the argument list necessary to run LINE as a command. Try to
avoid using a shell. This routine handles only ' quoting, and " quoting
when no backslash, $ or ` characters are seen in the quotes. Starting
quotes may be escaped with a backslash. If any of the characters in
sh_chars[] is seen, or any of the builtin commands listed in sh_cmds[]
is the first word of a line, the shell is used.
If RESTP is not NULL, *RESTP is set to point to the first newline in LINE.
If *RESTP is NULL, newlines will be ignored.

39
main.c
View File

@@ -1,5 +1,5 @@
/* Argument parsing and main program of GNU Make.
Copyright (C) 1988, 89, 90, 91, 94 Free Software Foundation, Inc.
Copyright (C) 1988, 89, 90, 91, 94, 1995 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -397,6 +397,15 @@ enter_command_line_file (name)
return enter_file (savestring (name, strlen (name)));
}
/* Toggle -d on receipt of SIGUSR1. */
static RETSIGTYPE
debug_signal_handler (sig)
int sig;
{
debug_flag = ! debug_flag;
}
int
main (argc, argv, envp)
int argc;
@@ -691,11 +700,16 @@ main (argc, argv, envp)
/* This makefile is standard input. Since we may re-exec
and thus re-read the makefiles, we read standard input
into a temporary file and read from that. */
static char name[] = "/tmp/GmXXXXXX";
FILE *outfile;
/* Make a unique filename. */
#ifdef HAVE_MKTEMP
static char name[] = "/tmp/GmXXXXXX";
(void) mktemp (name);
#else
static char name[L_tmpnam];
(void) tmpnam ();
#endif
outfile = fopen (name, "w");
if (outfile == 0)
@@ -744,6 +758,11 @@ main (argc, argv, envp)
(void) signal (SIGCLD, child_handler);
#endif
/* Let the user send us SIGUSR1 to toggle the -d flag during the run. */
#ifdef SIGUSR1
(void) signal (SIGUSR1, debug_signal_handler);
#endif
/* Define the initial list of suffixes for old-style rules. */
set_default_suffixes ();
@@ -1367,13 +1386,16 @@ positive integral argument",
if (!env && (bad || print_usage_flag))
{
/* Print a nice usage message. */
FILE *usageto;
if (print_version_flag)
print_version ();
fprintf (stderr, "Usage: %s [options] [target] ...\n", program);
usageto = bad ? stderr : stdout;
fputs ("Options:\n", stderr);
fprintf (usageto, "Usage: %s [options] [target] ...\n", program);
fputs ("Options:\n", usageto);
for (cs = switches; cs->c != '\0'; ++cs)
{
char buf[1024], shortarg[50], longarg[50], *p;
@@ -1444,11 +1466,11 @@ positive integral argument",
line with the description, leaving at least two spaces.
Print it on its own line instead. */
{
fprintf (stderr, "%s\n", buf);
fprintf (usageto, "%s\n", buf);
buf[0] = '\0';
}
fprintf (stderr, "%*s%s.\n",
fprintf (usageto, "%*s%s.\n",
- DESCRIPTION_COLUMN,
buf, cs->description);
}
@@ -1781,6 +1803,11 @@ define_makeflags (all, makefile)
p += sizeof ref - 1;
}
}
else if (p == &flagstring[1])
{
words = 0;
--p;
}
else if (p[-1] == '-')
/* Kill the final space and dash. */
p -= 2;

View File

@@ -163,6 +163,11 @@ the file names where they should reside for actual use. If there is a
simple test to verify that a program is properly installed, this target
should run that test.
If possible, write the @code{install} target rule so that it does not
modify anything in the directory where the program was built, provided
@samp{make all} has just been done. This is convenient for building the
program under one user name and installing it under another.
The commands should create all the directories in which files are to be
installed, if they don't already exist. This includes the directories
specified as the values of the variables @code{prefix} and
@@ -205,6 +210,9 @@ Delete all the installed files that the @samp{install} target would
create (but not the noninstalled files such as @samp{make all} would
create).
This rule should not modify the directories where compilation is done,
only the directories where files are installed.
@comment The gratuitous blank line here is to make the table look better
@comment in the printed Make manual. Please leave it in.
@item clean
@@ -327,6 +335,9 @@ installdirs: mkinstalldirs
$(libdir) $(infodir) \
$(mandir)
@end smallexample
This rule should not modify the directories where compilation is done.
It should do nothing but create installation directories.
@end table
@node Command Variables
@@ -401,7 +412,9 @@ installed.
Installation directories should always be named by variables, so it is
easy to install in a nonstandard place. The standard names for these
variables are as follows.
variables are described below. They are based on a standard filesystem
layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
other modern operating systems.
These two variables set the root for the installation. All the other
installation directories should be subdirectories of one of these two,
@@ -411,7 +424,8 @@ and nothing should be directly installed into these two directories.
@item prefix
A prefix used in constructing the default values of the variables listed
below. The default value of @code{prefix} should be @file{/usr/local}
(at least for now).
When building the complete GNU system, the prefix will be empty and
@file{/usr} will be a symbolic link to @file{/}.
@item exec_prefix
A prefix used in constructing the default values of some of the

View File

@@ -5400,12 +5400,12 @@ variable names because many strange things are valid variable names, but
are probably not what you intended. For example,
@smallexample
files := $(foreach Es escrito en espanol!,b c ch,$(find_files))
files := $(foreach Esta escrito en espanol!,b c ch,$(find_files))
@end smallexample
@noindent
might be useful if the value of @code{find_files} references the variable
whose name is @samp{Es escrito en espanol!} (es un nombre bastante largo,
whose name is @samp{Esta escrito en espanol!} (es un nombre bastante largo,
no?), but it is more likely to be a mistake.
@node Origin Function, Shell Function, Foreach Function, Functions

View File

@@ -1,5 +1,5 @@
/* Basic dependency engine 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, 1995 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -491,7 +491,16 @@ update_file_1 (file, depth)
return dep_status;
}
set_command_state (file, cs_not_started);
if (file->command_state == cs_deps_running)
/* The commands for some deps were running on the last iteration, but
they have finished now. Reset the command_state to not_started to
simplify later bookkeeping. It is important that we do this only
when the prior state was cs_deps_running, because that prior state
was definitely propagated to FILE's also_make's by set_command_state
(called above), but in another state an also_make may have
independently changed to finished state, and we would confuse that
file's bookkeeping (updated, but not_started is bogus state). */
set_command_state (file, cs_not_started);
/* Now record which dependencies are more
recent than this file, so we can define $?. */
@@ -547,7 +556,6 @@ update_file_1 (file, depth)
if (!must_make)
{
DEBUGPR ("No need to remake target `%s'.\n");
file->update_status = 0;
notice_finished_file (file);
return 0;
}
@@ -596,12 +604,12 @@ notice_finished_file (file)
if (touch_flag
/* The update status will be:
-1 if no commands were run;
0 if some commands (+ or ${MAKE}) were run and won;
-1 if this target was not remade;
0 if 0 or more commands (+ or ${MAKE}) were run and won;
1 if some commands were run and lost.
The only time we don't want to touch the target is if
it had some recursive commands, and they lost. */
&& file->update_status != 1)
We touch the target if it has commands which either were not run
or won when they ran (i.e. status is 0). */
&& file->update_status == 0)
{
if (file->cmds != 0 && file->cmds->any_recurse)
{
@@ -639,7 +647,7 @@ notice_finished_file (file)
f->last_mtime = file->last_mtime;
}
if (file->update_status != -1)
if (ran && file->update_status != -1)
/* We actually tried to update FILE, which has
updated its also_make's as well (if it worked).
If it didn't work, it wouldn't work again for them.
@@ -845,6 +853,9 @@ remake_file (file)
execute_file_commands (file);
return;
}
else
/* This tells notice_finished_file it is ok to touch the file. */
file->update_status = 0;
}
/* This does the touching under -t. */