summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ninja.rc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ninja.rc b/ninja.rc
index b0064d29..8b618054 100644
--- a/ninja.rc
+++ b/ninja.rc
@@ -156,7 +156,12 @@ fn sym {
fn fetch {
allsrcs=`{printf %s\n $allsrcs | sort -u}
- if(! ~ $#allsrcs 0) build $"allsrcs fetch$1 '|' '$dir'/.rev
+ if(! ~ $#allsrcs 0) {
+ # Use a phony rule and stamp file to prevent ninja from making
+ # parent directories.
+ build '$outdir'/fetch.stamp fetch$1 '|' '$dir'/.rev
+ build $"allsrcs phony '$outdir'/fetch.stamp
+ }
status=()
}