summaryrefslogtreecommitdiff
path: root/ninja.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-02-15 21:24:24 -0800
committerMichael Forney <mforney@mforney.org>2018-02-16 02:52:34 -0800
commit741d25282274e59c785b9cbee23cefff3d2721a2 (patch)
treeb7eaf7402cb1a61c220a3f0eecc3bc63cec14eaa /ninja.lua
parent83d57181d1565d9c12b7d2467be9008d2b6edeab (diff)
Port build scripts to POSIX shell
Since we are now using Lua to generate ninja files, use of rc in build scripts seems unnecessary and adds an additional bootstrap dependency. None of them are too fancy, so just port to POSIX sh instead.
Diffstat (limited to 'ninja.lua')
-rw-r--r--ninja.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/ninja.lua b/ninja.lua
index e07c574a..137c9974 100644
--- a/ninja.lua
+++ b/ninja.lua
@@ -360,8 +360,14 @@ function waylandproto(proto, client, server, code)
cc(code, {'pkg/wayland/headers'})
end
-function fetch(method, args)
- build('fetch'..method, '$dir/fetch', {'|', '$dir/rev'}, {args=args})
+function fetch(method)
+ local script
+ if method == 'local' then
+ script = '$dir/fetch.sh'
+ else
+ script = 'scripts/fetch-'..method..'.sh'
+ end
+ build('fetch'..method, '$dir/fetch', {'|', '$dir/rev', script})
if next(pkg.inputs.fetch) then
build('phony', table.keys(pkg.inputs.fetch), '$dir/fetch')
end
@@ -404,7 +410,7 @@ function file(path, mode, src)
local out = '$builddir/root.hash/'..path
mode = tonumber(mode, 8)
local perm = string.format('10%04o %s', mode, path)
- build('githash', out, {src, '|', 'scripts/hash.rc', '||', '$builddir/root.stamp'}, {
+ build('githash', out, {src, '|', 'scripts/hash.sh', '||', '$builddir/root.stamp'}, {
args=perm,
})
table.insert(pkg.inputs.index, out)
@@ -426,7 +432,7 @@ function sym(path, target)
return
end
local out = '$builddir/root.hash/'..path
- build('githash', out, {'|', 'scripts/hash.rc', '||', '$builddir/root.stamp'}, {
+ build('githash', out, {'|', 'scripts/hash.sh', '||', '$builddir/root.stamp'}, {
args=string.format('120000 %s %s', path, target),
})
table.insert(pkg.inputs.index, out)