* Fix problems with INTERMEDIATE rules.
+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>.
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:
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)
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;
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;
+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
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;
{
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);