mirror of
https://github.com/oasislinux/oasis.git
synced 2026-05-12 21:34:47 +02:00
Use table to control waylandproto outputs
This commit is contained in:
@@ -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
|
||||
|
||||
+4
-1
@@ -36,7 +36,10 @@ pkg.deps = {
|
||||
|
||||
build('copy', '$outdir/video/out/wayland/xdg-shell.h', '$builddir/pkg/wayland-protocols/include/xdg-shell-client-protocol.h')
|
||||
build('copy', '$outdir/video/out/wayland/idle-inhibit-v1.h', '$builddir/pkg/wayland-protocols/include/idle-inhibit-unstable-v1-client-protocol.h')
|
||||
waylandproto('video/out/wayland/server-decoration.xml', 'video/out/wayland/srv-decor.h', nil, 'video/out/wayland/srv-decor.c')
|
||||
waylandproto('video/out/wayland/server-decoration.xml', {
|
||||
client='video/out/wayland/srv-decor.h',
|
||||
code='video/out/wayland/srv-decor.c',
|
||||
})
|
||||
|
||||
rule('file2string', '$outdir/file2string $in >$out.tmp && mv $out.tmp $out')
|
||||
local function file2string(out, inp)
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@ cflags{
|
||||
|
||||
cc('launch/protocol.c')
|
||||
|
||||
waylandproto('protocol/swc.xml', 'include/swc-client-protocol.h', 'include/swc-server-protocol.h', 'swc-protocol.c')
|
||||
waylandproto('protocol/swc.xml', {
|
||||
client='include/swc-client-protocol.h',
|
||||
server='include/swc-server-protocol.h',
|
||||
code='swc-protocol.c',
|
||||
})
|
||||
|
||||
pkg.hdrs = {
|
||||
copy('$outdir/include', '$srcdir/libswc', {'swc.h'}),
|
||||
|
||||
+5
-4
@@ -9,10 +9,11 @@ cflags{
|
||||
'-I $builddir/pkg/wld/include',
|
||||
}
|
||||
|
||||
waylandproto('protocol/velox.xml',
|
||||
'protocol/velox-client-protocol.h',
|
||||
'protocol/velox-server-protocol.h',
|
||||
'velox-protocol.c')
|
||||
waylandproto('protocol/velox.xml', {
|
||||
client='protocol/velox-client-protocol.h',
|
||||
server='protocol/velox-server-protocol.h',
|
||||
code='velox-protocol.c',
|
||||
})
|
||||
build('copy', '$outdir/protocol/swc-client-protocol.h', '$builddir/pkg/swc/include/swc-client-protocol.h')
|
||||
|
||||
pkg.deps = {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
cflags{'-I $builddir/pkg/wayland/include'}
|
||||
|
||||
waylandproto('stable/xdg-shell/xdg-shell.xml',
|
||||
'include/xdg-shell-client-protocol.h',
|
||||
'include/xdg-shell-server-protocol.h',
|
||||
'xdg-shell-protocol.c'
|
||||
)
|
||||
waylandproto('stable/xdg-shell/xdg-shell.xml', {
|
||||
client='include/xdg-shell-client-protocol.h',
|
||||
server='include/xdg-shell-server-protocol.h',
|
||||
code='xdg-shell-protocol.c',
|
||||
})
|
||||
|
||||
waylandproto('unstable/idle-inhibit/idle-inhibit-unstable-v1.xml',
|
||||
'include/idle-inhibit-unstable-v1-client-protocol.h',
|
||||
'include/idle-inhibit-unstable-v1-server-protocol.h',
|
||||
'idle-inhibit-v1-protocol.c'
|
||||
)
|
||||
waylandproto('unstable/idle-inhibit/idle-inhibit-unstable-v1.xml', {
|
||||
client='include/idle-inhibit-unstable-v1-client-protocol.h',
|
||||
server='include/idle-inhibit-unstable-v1-server-protocol.h',
|
||||
code='idle-inhibit-v1-protocol.c'
|
||||
})
|
||||
|
||||
pkg.hdrs = {
|
||||
'$outdir/include/xdg-shell-client-protocol.h',
|
||||
|
||||
Reference in New Issue
Block a user