From 7ca73fcd4ec225aa96fae37b2bb2a6f86174fdb0 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 9 Jul 2016 15:11:41 -0700 Subject: Always emit fetch rule if specified --- ninja.rc | 19 +++++++++---------- 1 file 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=() } -- cgit v1.2.3