summaryrefslogtreecommitdiff
path: root/ninja.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ninja.lua')
-rw-r--r--ninja.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/ninja.lua b/ninja.lua
index 22333166..ec1b8894 100644
--- a/ninja.lua
+++ b/ninja.lua
@@ -363,9 +363,15 @@ end
function waylandproto(proto, client, server, code)
proto = '$srcdir/'..proto
code = '$outdir/'..code
- build('waylandproto', '$outdir/'..client, proto, {type='client-header'})
- build('waylandproto', '$outdir/'..server, proto, {type='server-header'})
- build('waylandproto', code, proto, {type='code'})
+ if client then
+ build('waylandproto', '$outdir/'..client, proto, {type='client-header'})
+ end
+ if server then
+ build('waylandproto', '$outdir/'..server, proto, {type='server-header'})
+ end
+ if code then
+ build('waylandproto', code, proto, {type='code'})
+ end
cc(code, {'pkg/wayland/headers'})
end