meson: src/access: generate libvirt_access*.xml files

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-07-27 09:08:51 +02:00
parent 85c11323b1
commit f7ca387fa6
3 changed files with 12 additions and 26 deletions

View File

@ -36,7 +36,6 @@ endif WITH_DTRACE_PROBES
RPC_PROBE_FILES =
include security/Makefile.inc.am
include access/Makefile.inc.am
include locking/Makefile.inc.am
include admin/Makefile.inc.am
include vbox/Makefile.inc.am

View File

@ -1,25 +0,0 @@
# vim: filetype=automake
ACCESS_DRIVER_API_FILES = \
libvirt_access.xml \
libvirt_access_qemu.xml \
libvirt_access_lxc.xml \
$(NULL)
BUILT_SOURCES += \
$(ACCESS_DRIVER_API_FILES) \
$(NULL)
libvirt_access.xml: $(srcdir)/rpc/gendispatch.pl \
$(REMOTE_PROTOCOL) Makefile.am
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
remote REMOTE $(REMOTE_PROTOCOL) > $@
libvirt_access_qemu.xml: $(srcdir)/rpc/gendispatch.pl \
$(QEMU_PROTOCOL) Makefile.am
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
qemu QEMU $(QEMU_PROTOCOL) > $@
libvirt_access_lxc.xml: $(srcdir)/rpc/gendispatch.pl \
$(LXC_PROTOCOL) Makefile.am
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
lxc LXC $(LXC_PROTOCOL) > $@

View File

@ -16,16 +16,19 @@ remote_path = meson.source_root() / 'src' / 'remote'
access_gen_headers = []
access_gen_sources = []
access_gen_sym = []
access_gen_xml = []
foreach name : [ 'remote', 'qemu', 'lxc' ]
if name == 'remote'
header_file = 'viraccessapicheck.h'
source_file = 'viraccessapicheck.c'
syms_file = 'libvirt_access.syms'
xml_file = 'libvirt_access.xml'
else
header_file = 'viraccessapicheck@0@.h'.format(name)
source_file = 'viraccessapicheck@0@.c'.format(name)
syms_file = 'libvirt_access_@0@.syms'.format(name)
xml_file = 'libvirt_access_@0@.xml'.format(name)
endif
protocol_file = remote_path / '@0@_protocol.x'.format(name)
@ -56,6 +59,15 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
gendispatch_prog, '--mode=aclsym', name, name.to_upper(), protocol_file,
]
)
access_gen_xml += custom_target(
xml_file,
output: xml_file,
capture: true,
command: [
gendispatch_prog, '--mode=aclapi', name, name.to_upper(), protocol_file,
],
)
endforeach
if conf.has('WITH_POLKIT')