diff options
author | Paul Smith <psmith@gnu.org> | 1999-12-18 17:43:47 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-12-18 17:43:47 +0000 |
commit | af44f16799fa185e2729cda1653c80d29b598642 (patch) | |
tree | eb3a7c2d2fdaff7b27d5c7f37939718538e3fa59 | |
parent | 1a35bfb45b3dfbd38c583247a90a21c3b10ccafa (diff) | |
download | gunmake-af44f16799fa185e2729cda1653c80d29b598642.tar.gz |
* Fix problems with double-colon rules.
* Fix problems with INTERMEDIATE rules.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | file.c | 4 | ||||
-rw-r--r-- | implicit.c | 7 | ||||
-rw-r--r-- | remake.c | 4 | ||||
-rw-r--r-- | tests/ChangeLog | 6 | ||||
-rw-r--r-- | tests/scripts/targets/INTERMEDIATE | 21 | ||||
-rw-r--r-- | variable.c | 2 |
7 files changed, 44 insertions, 12 deletions
@@ -1,8 +1,18 @@ +1999-12-15 Paul D. Smith <psmith@gnu.org> + + * variable.c (print_variable): Print the variable with += if the + append flag is set. + + * implicit.c (pattern_search): Remove the extra check of the + implicit flag added on 8/24/1998. This causes problems and the + reason for the change was better resolved by the change made to + check_deps() on 8/26/1998. This fixes PR/1423. + 1999-12-08 Paul D. Smith <psmith@gnu.org> * dir.c (dir_setup_glob): On 64 bit ReliantUNIX (5.44 and above) in LFS mode, stat() is actually a macro for stat64(). Assignment - doesn't work in that case. So, stat is a macro, make a local + doesn't work in that case. So, if stat() is a macro, make a local wrapper function to invoke it. (local_stat): Wrapper function, if needed. Reported by Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>. @@ -654,8 +654,8 @@ print_file (f) file_timestamp_sprintf (buf, f->last_mtime); printf (_("# Last modified %s\n"), buf); } - printf (_("# File has%s been updated.\n"), - f->updated ? "" : _(" not")); + puts (f->updated + ? _("# File has been updated.") : _("# File has not been updated.")); switch (f->command_state) { case cs_running: @@ -340,8 +340,6 @@ pattern_search (file, archive, depth, recursions) deps_found = 0; for (dep = rule->deps; dep != 0; dep = dep->next) { - struct file *fp; - /* If the dependency name has a %, substitute the stem. */ p = strchr (dep_name (dep), '%'); if (p != 0) @@ -395,12 +393,9 @@ pattern_search (file, archive, depth, recursions) dependency file we are actually looking for is in a different directory (the one gotten by prepending FILENAME's directory), so it might actually exist. */ - /* If we find a file but the intermediate flag is set, then it - was put here by a .INTERMEDIATE: rule so ignore it. */ if ((!dep->changed || check_lastslash) - && (((fp = lookup_file (p)) != 0 && !fp->intermediate) - || file_exists_p (p))) + && (lookup_file (p) != 0 || file_exists_p (p))) { found_files[deps_found++] = xstrdup (p); continue; @@ -323,8 +323,8 @@ update_file (file, depth) return 0; } - /* This loop runs until we start a double colon rule, or until the - chain is exhausted. */ + /* This loop runs until we start commands for a double colon rule, or until + the chain is exhausted. */ for (; f != 0; f = f->prev) { f->considered = considered; diff --git a/tests/ChangeLog b/tests/ChangeLog index 26707d4..5a6ba71 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +1999-12-15 Paul D. Smith <psmith@gnu.org> + + * scripts/targets/INTERMEDIATE: Add a test for PR/1423: make sure + .INTERMEDIATE settings on files don't disable them as implicit + intermediate possibilities. + 1999-12-01 Paul D. Smith <psmith@gnu.org> * scripts/features/double_colon: Add a test for PR/1476: Try diff --git a/tests/scripts/targets/INTERMEDIATE b/tests/scripts/targets/INTERMEDIATE index 3ea6421..a1df8bf 100644 --- a/tests/scripts/targets/INTERMEDIATE +++ b/tests/scripts/targets/INTERMEDIATE @@ -82,5 +82,26 @@ $answer = "cp foo.f foo.e\ncp bar.f bar.e\ncat foo.e bar.e > foo.c\nrm foo.e bar unlink('foo.f', 'foo.e', 'foo.d', 'foo.c', 'bar.f', 'bar.e', 'bar.d', 'bar.c'); +# TEST #6 -- added for PR/1423 + +$makefile2 = &get_tmpfile; + +open(MAKEFILE, "> $makefile2"); + +print MAKEFILE <<'EOF'; +all: foo +foo.a: ; touch $@ +%: %.a ; touch $@ +.INTERMEDIATE: foo.a +EOF + +close(MAKEFILE); + +&run_make_with_options($makefile2, "-R", &get_logfile); +$answer = "touch foo.a\ntouch foo\nrm foo.a\n"; +&compare_output($answer, &get_logfile(1)); + +unlink('foo'); + # This tells the test driver that the perl test script executed properly. 1; @@ -1008,7 +1008,7 @@ print_variable (v, prefix) { register char *p; - printf ("%s %s= ", v->name, v->recursive ? "" : ":"); + printf ("%s %s= ", v->name, v->recursive ? v->append ? "+" : "" : ":"); /* Check if the value is just whitespace. */ p = next_token (v->value); |