summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ninja.lua2
-rw-r--r--rules.ninja18
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