From 71e6699d92b216d83f39c6b99ad97f6ee74cc69f Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Thu, 19 Sep 2019 20:40:57 -0700 Subject: Use table to control waylandproto outputs --- ninja.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ninja.lua') 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 -- cgit v1.2.3