chiark / gitweb /
&TARGETS*: make autogenerated targets .PHONY
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Dec 2019 23:12:25 +0000 (23:12 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Dec 2019 23:12:25 +0000 (23:12 +0000)
Suggested-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
generate

index dd22146..7bdbd88 100755 (executable)
--- a/generate
+++ b/generate
@@ -254,6 +254,11 @@ sub process_subtree ($$) {
        }
        print O "\n";
     }
+    if (@targets) {
+       print O ".PHONY:";
+       print O " ${dir_prefix}${_}" foreach @targets;
+       print O "\n";
+    }
 
     return @targets;
 }