summaryrefslogtreecommitdiff
path: root/ninja.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-09-19 20:40:57 -0700
committerMichael Forney <mforney@mforney.org>2019-09-19 20:41:23 -0700
commit71e6699d92b216d83f39c6b99ad97f6ee74cc69f (patch)
treec575a8b8404f46f8cc5fad26d231ae3de0a4e98f /ninja.lua
parenta9a4415ee61ed549c46742238fb930e3760edae3 (diff)
Use table to control waylandproto outputs
Diffstat (limited to 'ninja.lua')
-rw-r--r--ninja.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/ninja.lua b/ninja.lua
index 2ea263b1..b793a3bf 100644
--- a/ninja.lua
+++ b/ninja.lua
@@ -359,16 +359,16 @@ function yacc(name, gram)
})
end
-function waylandproto(proto, client, server, code, args)
+function waylandproto(proto, outs, args)
proto = '$srcdir/'..proto
- code = '$outdir/'..code
- if client then
- build('waylandproto', '$outdir/'..client, proto, {type='client-header'})
+ if outs.client then
+ build('waylandproto', '$outdir/'..outs.client, proto, {type='client-header'})
end
- if server then
- build('waylandproto', '$outdir/'..server, proto, {type='server-header'})
+ if outs.server then
+ build('waylandproto', '$outdir/'..outs.server, proto, {type='server-header'})
end
- if code then
+ if outs.code then
+ local code = '$outdir/'..outs.code
build('waylandproto', code, proto, {type='code'})
cc(code, {'pkg/wayland/headers'}, args)
end