summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--file.c4
-rw-r--r--implicit.c7
-rw-r--r--remake.c4
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/scripts/targets/INTERMEDIATE21
-rw-r--r--variable.c2
7 files changed, 44 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 75f37c9..9dbdb6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>.
diff --git a/file.c b/file.c
index 55ca7ee..1ce4b89 100644
--- a/file.c
+++ b/file.c
@@ -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:
diff --git a/implicit.c b/implicit.c
index 88bce9e..4156402 100644
--- a/implicit.c
+++ b/implicit.c
@@ -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;
diff --git a/remake.c b/remake.c
index af559ac..182cc8c 100644
--- a/remake.c
+++ b/remake.c
@@ -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;
diff --git a/variable.c b/variable.c
index 2d73b08..8058a74 100644
--- a/variable.c
+++ b/variable.c
@@ -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);