behaving properly (if you listed prerequisites it worked properly).
+2003-03-28 Paul D. Smith <psmith@gnu.org>
+
+ * file.c (snap_deps): If .SECONDARY with no targets is given, set
+ the intermediate flag on all targets. Fixes bug #2515.
+
2003-03-24 Paul D. Smith <psmith@gnu.org>
* configure.in, Makefile.am, glob/Makefile.am, doc/Makefile.am:
}
}
\f
+/* Set the intermediate flag. */
+
+static void
+set_intermediate (const void *item)
+{
+ struct file *f = (struct file *) item;
+ f->intermediate = 1;
+}
+
/* For each dependency of each file, make the `struct dep' point
at the appropriate `struct file' (which may have to be created).
f2->intermediate = f2->secondary = 1;
/* .SECONDARY with no deps listed marks *all* files that way. */
else
- all_secondary = 1;
+ {
+ all_secondary = 1;
+ hash_map (&files, set_intermediate);
+ }
}
f = lookup_file (".EXPORT_ALL_VARIABLES");
+2003-03-28 Paul D. Smith <psmith@gnu.org>
+
+ * scripts/targets/SECONDARY: Test the "global" .SECONDARY (with
+ not prerequisites)--Bug #2515.
+
2003-01-30 Paul D. Smith <psmith@gnu.org>
* scripts/features/targetvars: Test very long target-specific
unlink('foo.f', 'foo.e', 'foo.d', 'foo.c');
+# TEST #7 -- test the "global" .SECONDARY, with no targets.
+
+$makefile2 = &get_tmpfile;
+
+open(MAKEFILE, "> $makefile2");
+
+print MAKEFILE <<'EOF';
+.SECONDARY:
+
+final: intermediate
+intermediate: source
+
+final intermediate source:
+ echo $< > $@
+EOF
+
+close(MAKEFILE);
+
+&utouch(-10, 'source');
+touch('final');
+
+&run_make_with_options($makefile2, '', &get_logfile);
+$answer = "$make_name: `final' is up to date.\n";
+&compare_output($answer, &get_logfile(1));
+
+unlink('source', 'final', 'intermediate');
+
# This tells the test driver that the perl test script executed properly.
1;