From f7ca387fa66479b70041b5e4d5b7bf147c65e8d2 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 27 Jul 2020 09:08:51 +0200 Subject: [PATCH] meson: src/access: generate libvirt_access*.xml files Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- src/Makefile.am | 1 - src/access/Makefile.inc.am | 25 ------------------------- src/access/meson.build | 12 ++++++++++++ 3 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 src/access/Makefile.inc.am diff --git a/src/Makefile.am b/src/Makefile.am index 7008b6388b..ce75fadeca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am deleted file mode 100644 index 7b311f1e6e..0000000000 --- a/src/access/Makefile.inc.am +++ /dev/null @@ -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) > $@ - diff --git a/src/access/meson.build b/src/access/meson.build index 52493dccbd..81795d0168 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -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')