summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2005-05-31 20:54:30 +0000
committerBoris Kolpackov <boris@kolpackov.net>2005-05-31 20:54:30 +0000
commitaf88a3550a6202361aa9eab7e59d83b0bf2c1610 (patch)
treefdcc9f84496083cac0fa2a852c56e9409c50be56 /implicit.c
parente50e0fdf8856fada821393af3dbd268db09c3b47 (diff)
downloadgunmake-af88a3550a6202361aa9eab7e59d83b0bf2c1610.tar.gz
Fixed Savannah bugs #13216 and #13218.
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/implicit.c b/implicit.c
index 67f0559..cae4c40 100644
--- a/implicit.c
+++ b/implicit.c
@@ -899,6 +899,13 @@ pattern_search (struct file *file, int archive,
file->cmds = rule->cmds;
file->is_target = 1;
+ /* Set precious flag. */
+ {
+ struct file *f = lookup_file (rule->targets[matches[foundrule]]);
+ if (f && f->precious)
+ file->precious = 1;
+ }
+
/* If this rule builds other targets, too, put the others into FILE's
`also_make' member. */
@@ -906,6 +913,7 @@ pattern_search (struct file *file, int archive,
for (i = 0; rule->targets[i] != 0; ++i)
if (i != matches[foundrule])
{
+ struct file *f;
struct dep *new = (struct dep *) xmalloc (sizeof (struct dep));
/* GKM FIMXE: handle '|' here too */
new->ignore_mtime = 0;
@@ -920,6 +928,12 @@ pattern_search (struct file *file, int archive,
rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1);
new->file = enter_file (new->name);
new->next = file->also_make;
+
+ /* Set precious flag. */
+ f = lookup_file (rule->targets[i]);
+ if (f && f->precious)
+ new->file->precious = 1;
+
file->also_make = new;
}