From cd5f4a833d2ca7449799b8a25a43226c74be5026 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 27 Jun 2016 22:48:45 -0700 Subject: Split the fetch rule into two --- ninja.rc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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=() } -- cgit v1.2.3