summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ninja.rc19
1 files changed, 9 insertions, 10 deletions
diff --git a/ninja.rc b/ninja.rc
index 9b124214..c279dd4e 100644
--- a/ninja.rc
+++ b/ninja.rc
@@ -169,18 +169,17 @@ fn sym {
}
fn fetch {
+ # Use a phony rule and stamp file to prevent ninja from making parent
+ # directories.
+ build '$outdir'/fetch.stamp fetch$1 '|' '$dir'/.rev
+ shift
+ if(! ~ $#* 0) {
+ *=''''$*''''
+ with args $"*
+ }
allsrcs=`{printf %s\n $allsrcs | sort -u}
- 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
- shift
- if(! ~ $#* 0) {
- *=''''$*''''
- with args $"*
- }
+ if(! ~ $#allsrcs 0)
build $"allsrcs phony '$outdir'/fetch.stamp
- }
status=()
}