Signed-off-by: Pavel Hrdina <phrd...@redhat.com>
---
 src/Makefile.am            |  1 -
 src/access/Makefile.inc.am | 21 ---------------------
 src/access/meson.build     | 12 ++++++++++++
 3 files changed, 12 insertions(+), 22 deletions(-)
 delete mode 100644 src/access/Makefile.inc.am

diff --git a/src/Makefile.am b/src/Makefile.am
index 07516aa43ae..63705b36b6f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,7 +35,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 d90829632ff..00000000000
--- a/src/access/Makefile.inc.am
+++ /dev/null
@@ -1,21 +0,0 @@
-# vim: filetype=automake
-
-ACCESS_DRIVER_API_FILES = \
-       libvirt_access.xml \
-       libvirt_access_qemu.xml \
-       libvirt_access_lxc.xml \
-       $(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 71bc4670091..2d8a2a90716 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')
-- 
2.26.2

Reply via email to