From dbe1077c3f0b6d79f8ea5eefd97f98780246d0cf Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 22 Jun 2020 12:42:12 -0700 Subject: Remove unnecessary fetch rules --- ninja.lua | 2 +- rules.ninja | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/ninja.lua b/ninja.lua index 56340244..0c21b5be 100644 --- a/ninja.lua +++ b/ninja.lua @@ -397,7 +397,7 @@ function fetch(method) else script = '$basedir/scripts/fetch-'..method..'.sh' end - build('fetch-'..method, '$dir/fetch', {'|', '$dir/ver', script}) + build('fetch', '$dir/fetch', {'|', '$dir/ver', script}, {script=script}) if basedir ~= '.' then build('phony', '$gendir/fetch', '$dir/fetch') end diff --git a/rules.ninja b/rules.ninja index bafd74ea..3be2aab8 100644 --- a/rules.ninja +++ b/rules.ninja @@ -118,22 +118,8 @@ rule git-archive rule git-init command = git init $repo_flags $repo && touch $out -rule fetch-curl - command = cd $basedir && sh scripts/fetch-curl.sh $gendir && touch $$OLDPWD/$out - description = FETCH $gendir - restat = 1 - generator = 1 - pool = console - -rule fetch-git - command = cd $basedir && sh scripts/fetch-git.sh $gendir && touch $$OLDPWD/$out - description = FETCH $gendir - restat = 1 - generator = 1 - pool = console - -rule fetch-local - command = cd $basedir && sh $gendir/fetch.sh $gendir && touch $$OLDPWD/$out +rule fetch + command = cd $basedir && sh $$OLDPWD/$script $gendir && touch $$OLDPWD/$out description = FETCH $gendir restat = 1 generator = 1 -- cgit v1.2.3