summaryrefslogtreecommitdiff
path: root/ninja.rc
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-27 22:48:45 -0700
committerMichael Forney <mforney@mforney.org>2016-06-27 23:01:04 -0700
commitcd5f4a833d2ca7449799b8a25a43226c74be5026 (patch)
treea9972e252be758e8fe0b439ff98e5f2d7a3125ba /ninja.rc
parent70cd0efb5a2c6e0b60cc7869b5d3eec5a534c3ff (diff)
Split the fetch rule into two
Diffstat (limited to 'ninja.rc')
-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=()
}