]> git.ipfire.org Git - thirdparty/make.git/commitdiff
[SV 48643] Make prereqs mentioned in unrelated rules explicit
authorDmitry Goncharov <dgoncharov@users.sf.net>
Fri, 21 Jan 2022 23:29:23 +0000 (18:29 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 6 Feb 2022 23:46:32 +0000 (18:46 -0500)
* src/implicit.c (pattern_search): Set is_explicit when a prereq
is mentioned in an unrelated rule.

src/implicit.c

index dc69d5195616121244b5e24b0594afff263819a0..2b5bdce3cd6e88b1e51712c6380274ceb6423b98 100644 (file)
@@ -761,6 +761,9 @@ pattern_search (struct file *file, int archive,
 
                   df = lookup_file (d->name);
 
+                  if (df && df->is_explicit)
+                    pat->is_explicit = 1;
+
                   /* If we found a file for the dep, set its intermediate flag.
                      df->is_explicit is set when the dep file is mentioned
                      explicitly on some other rule.  d->is_explicit is set when