summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--doc/make.texi35
-rw-r--r--implicit.c2
-rw-r--r--job.c13
4 files changed, 39 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 2932ea8..4b4c6c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-01-07 Paul D. Smith <psmith@gnu.org>
+ * doc/make.texi (Target-specific): Fix Savannah bug #1772.
+ (MAKE Variable): Fix Savannah bug #4898.
+
+ * job.c (construct_command_argv_internal): Add "!" to the list of
+ shell escape chars. POSIX sh allows it to appear before a
+ command, to negate the exit code. Fixes bug #6404.
+
* implicit.c (pattern_search): When matching an implicit rule,
remember which dependencies have the ignore_mtime flag set.
Original fix provided in Savannah patch #2349, by Benoit
diff --git a/doc/make.texi b/doc/make.texi
index a8bc6a6..a81e8ba 100644
--- a/doc/make.texi
+++ b/doc/make.texi
@@ -38,7 +38,8 @@ and issues the commands to recompile them.
This is Edition @value{EDITION}, last updated @value{UPDATED},
of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}.
-Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+1998, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -57,11 +58,11 @@ Texts. A copy of the license is included in the section entitled
@subtitle A Program for Directing Recompilation
@subtitle GNU @code{make} Version @value{VERSION}
@subtitle @value{UPDATE-MONTH}
-@author Richard M. Stallman, Roland McGrath, Paul Smith
+@author Richard M. Stallman, Roland McGrath, Paul D. Smith
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
@sp 2
Published by the Free Software Foundation @*
59 Temple Place -- Suite 330, @*
@@ -350,7 +351,7 @@ The @code{make} utility automatically determines which pieces of a large
program need to be recompiled, and issues commands to recompile them.
This manual describes GNU @code{make}, which was implemented by Richard
Stallman and Roland McGrath. Development since Version 3.76 has been
-handled by Paul Smith.
+handled by Paul D. Smith.
GNU @code{make} conforms to section 6.2 of @cite{IEEE Standard
1003.2-1992} (POSIX.2).
@@ -3675,7 +3676,11 @@ a rule alters the effects of the @samp{-t} (@samp{--touch}), @samp{-n}
(@samp{--just-print}), or @samp{-q} (@w{@samp{--question}}) option.
Using the @code{MAKE} variable has the same effect as using a @samp{+}
character at the beginning of the command line. @xref{Instead of
-Execution, ,Instead of Executing the Commands}.@refill
+Execution, ,Instead of Executing the Commands}. This special feature
+is only enabled if the @code{MAKE} variable appears directly in the
+command script: it does not apply if the @code{MAKE} variable is
+referenced through expansion of another variable. In the latter case
+you must use the @samp{+} token to get these special effects.@refill
Consider the command @samp{make -t} in the above example. (The
@samp{-t} option marks targets as up to date without actually running
@@ -5225,10 +5230,11 @@ environment if the @samp{-e} option is in force) will take precedence.
Specifying the @code{override} directive will allow the target-specific
variable value to be preferred.
-There is one more special feature of target-specific variables: when you
-define a target-specific variable, that variable value is also in effect
-for all prerequisites of this target (unless those prerequisites override
-it with their own target-specific variable value). So, for example, a
+There is one more special feature of target-specific variables: when
+you define a target-specific variable that variable value is also in
+effect for all prerequisites of this target, and all their
+prerequisites, etc. (unless those prerequisites override that variable
+with their own target-specific variable value). So, for example, a
statement like this:
@example
@@ -5240,7 +5246,16 @@ prog : prog.o foo.o bar.o
will set @code{CFLAGS} to @samp{-g} in the command script for
@file{prog}, but it will also set @code{CFLAGS} to @samp{-g} in the
command scripts that create @file{prog.o}, @file{foo.o}, and
-@file{bar.o}, and any command scripts which create their prerequisites.
+@file{bar.o}, and any command scripts which create their
+prerequisites.
+
+Be aware that a given prerequisite will only be built once per
+invocation of make, at most. If the same file is a prerequisite of
+multiple targets, and each of those targets has a different value for
+the same target-specific variable, then the first target to be built
+will cause that prerequisite to be built and the prerequisite will
+inherit the target-specific value from the first target. It will
+ignore the target-specific values from any other targets.
@node Pattern-specific, , Target-specific, Using Variables
@section Pattern-specific Variable Values
diff --git a/implicit.c b/implicit.c
index 1fa0534..165afdb 100644
--- a/implicit.c
+++ b/implicit.c
@@ -103,7 +103,7 @@ pattern_search (struct file *file, int archive,
/* This buffer records all the dependencies actually found for a rule. */
char **found_files = (char **) alloca (max_pattern_deps * sizeof (char *));
- /* This list notes if the associated dep has an "ignore_mtime" flag set. */
+ /* Remember whether the associated dep has an "ignore_mtime" flag set. */
unsigned char *found_files_im = (unsigned char *) alloca (max_pattern_deps * sizeof (unsigned char));
/* Number of dep names now in FOUND_FILES. */
unsigned int deps_found = 0;
diff --git a/job.c b/job.c
index 755c814..4fa9d8f 100644
--- a/job.c
+++ b/job.c
@@ -358,13 +358,12 @@ vms_redirect (struct dsc$descriptor_s *desc, char *fname, char *ibuf)
}
-/*
- found apostrophe at (p-1)
-
- inc p until after closing apostrophe. */
+/* found apostrophe at (p-1)
+ inc p until after closing apostrophe.
+ */
static char *
-handle_apos (char *p)
+vms_handle_apos (char *p)
{
int alast;
int inside;
@@ -2160,7 +2159,7 @@ child_execute_job (char *argv, struct child *child)
/* Nice places for line breaks are after strings, after
comma or space and before slash. */
case '"':
- q = handle_apos (q + 1);
+ q = vms_handle_apos (q + 1);
sep = q;
break;
case ',':
@@ -2695,7 +2694,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
char* sh_chars;
char** sh_cmds;
#else /* must be UNIX-ish */
- static char sh_chars[] = "#;\"*?[]&|<>(){}$`^~";
+ static char sh_chars[] = "#;\"*?[]&|<>(){}$`^~!";
static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login",
"logout", "set", "umask", "wait", "while", "for",
"case", "if", ":", ".", "break", "continue",