summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2003-03-28 06:31:44 +0000
committerPaul Smith <psmith@gnu.org>2003-03-28 06:31:44 +0000
commit652234e967b825478d0b756a65353f252adf73d3 (patch)
treead9f9497f6ee9abe4c8d2b0d7d3e04ca12fab24c /file.c
parentacb2e6496630080a172d8938f0e0a459ee2929e2 (diff)
downloadgunmake-652234e967b825478d0b756a65353f252adf73d3.tar.gz
Fix bug #2515: the .SECONDARY target with no prerequisites wasn't
behaving properly (if you listed prerequisites it worked properly).
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/file.c b/file.c
index 77e3e6a..f043e9c 100644
--- a/file.c
+++ b/file.c
@@ -392,6 +392,15 @@ remove_intermediates (int sig)
}
}
+/* 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).
@@ -473,7 +482,10 @@ snap_deps (void)
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");