Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/Makefile.am | 8 +------- src/bhyve/Makefile.inc.am | 1 - src/bhyve/meson.build | 2 ++ src/interface/Makefile.inc.am | 1 - src/interface/meson.build | 2 ++ src/libxl/Makefile.inc.am | 1 - src/libxl/meson.build | 2 ++ src/lxc/Makefile.inc.am | 4 ---- src/lxc/meson.build | 6 ++++++ src/meson.build | 11 +++++++++++ src/network/Makefile.inc.am | 1 - src/network/meson.build | 2 ++ src/node_device/Makefile.inc.am | 6 ------ src/node_device/meson.build | 2 ++ src/nwfilter/Makefile.inc.am | 1 - src/nwfilter/meson.build | 2 ++ src/qemu/Makefile.inc.am | 1 - src/qemu/meson.build | 2 ++ src/secret/Makefile.inc.am | 1 - src/secret/meson.build | 2 ++ src/storage/Makefile.inc.am | 1 - src/storage/meson.build | 2 ++ src/vbox/Makefile.inc.am | 6 ------ src/vbox/meson.build | 5 +++++ src/vz/Makefile.inc.am | 1 - src/vz/meson.build | 2 ++ 26 files changed, 43 insertions(+), 32 deletions(-) delete mode 100644 src/vbox/Makefile.inc.am diff --git a/src/Makefile.am b/src/Makefile.am index e5d338409dc..54e3ed42974 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,7 +20,6 @@ # here. List them against the individual XXX_la_CFLAGS targets # that actually use them. -DRIVER_SOURCE_FILES = STATEFUL_DRIVER_SOURCE_FILES = augeas_DATA = augeastest_DATA = @@ -31,7 +30,6 @@ RPC_PROBE_FILES = include locking/Makefile.inc.am include admin/Makefile.inc.am -include vbox/Makefile.inc.am include qemu/Makefile.inc.am include bhyve/Makefile.inc.am include libxl/Makefile.inc.am @@ -99,10 +97,6 @@ else !WITH_REMOTE check-protocol: endif !WITH_REMOTE -check-driverimpls: - $(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/check-driverimpls.py \ - $(DRIVER_SOURCE_FILES) - check-aclrules: $(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/check-aclrules.py \ $(REMOTE_PROTOCOL) \ @@ -114,7 +108,7 @@ check-aclperms: $(srcdir)/access/viraccessperm.c check-local: check-protocol \ - check-driverimpls check-aclrules \ + check-aclrules \ check-aclperms check-admin .PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct) diff --git a/src/bhyve/Makefile.inc.am b/src/bhyve/Makefile.inc.am index 65021d785a2..7a9c6a87242 100644 --- a/src/bhyve/Makefile.inc.am +++ b/src/bhyve/Makefile.inc.am @@ -1,4 +1,3 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(BHYVE_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(BHYVE_DRIVER_SOURCES)) diff --git a/src/bhyve/meson.build b/src/bhyve/meson.build index fd1f6bbad88..12b933b0b44 100644 --- a/src/bhyve/meson.build +++ b/src/bhyve/meson.build @@ -10,6 +10,8 @@ bhyve_sources = files( 'bhyve_process.c', ) +driver_source_files += bhyve_sources + if conf.has('WITH_BHYVE') bhyve_driver_impl = static_library( 'virt_driver_bhyve_impl', diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am index 06bd8f820b1..6cd6dff3b90 100644 --- a/src/interface/Makefile.inc.am +++ b/src/interface/Makefile.inc.am @@ -1,5 +1,4 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES)) diff --git a/src/interface/meson.build b/src/interface/meson.build index 8b5347bce43..bd04a7f350f 100644 --- a/src/interface/meson.build +++ b/src/interface/meson.build @@ -10,6 +10,8 @@ if conf.has('WITH_UDEV') interface_driver_sources += 'interface_backend_udev.c' endif +driver_source_files += files(interface_driver_sources) + if conf.has('WITH_INTERFACE') virt_modules += { 'name': 'virt_driver_interface', diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am index 5af19c83512..d713f4e75aa 100644 --- a/src/libxl/Makefile.inc.am +++ b/src/libxl/Makefile.inc.am @@ -1,4 +1,3 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(LIBXL_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(LIBXL_DRIVER_SOURCES)) diff --git a/src/libxl/meson.build b/src/libxl/meson.build index a5df0011b0b..6720d826435 100644 --- a/src/libxl/meson.build +++ b/src/libxl/meson.build @@ -10,6 +10,8 @@ libxl_driver_sources = [ 'xen_xm.c', ] +driver_source_files += files(libxl_driver_sources) + if conf.has('WITH_LIBXL') libxl_driver_imp = static_library( 'virt_driver_libxl_impl', diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index 7f312975d6c..6abd08e333e 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -1,9 +1,5 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += \ - $(LXC_MONITOR_PROTOCOL_GENERATED) \ - $(LXC_MONITOR_GENERATED) \ - $(addprefix $(srcdir)/,$(LXC_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(LXC_MONITOR_PROTOCOL_GENERATED) \ $(LXC_MONITOR_GENERATED) \ diff --git a/src/lxc/meson.build b/src/lxc/meson.build index ccb11ee1d42..65dff6a7c4b 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -40,6 +40,12 @@ lxc_monitor_generated = custom_target( capture: true, ) +driver_source_files += [ + files(lxc_driver_sources), + lxc_monitor_protocol_generated, + lxc_monitor_generated, +] + lxc_controller_sources = files( 'lxc_conf.c', 'lxc_container.c', diff --git a/src/meson.build b/src/meson.build index 5fb90f61687..e30bf7e90b6 100644 --- a/src/meson.build +++ b/src/meson.build @@ -207,6 +207,10 @@ sysconf_files = [] # list of directories to create during installation virt_install_dirs = [] +# driver_source_files: +# driver source files to check +driver_source_files = [] + # list subdirectories @@ -835,3 +839,10 @@ test( ], env: runutf8, ) + +test( + 'check-driverimpls', + python3_prog, + args: [ check_driverimpls_prog.path(), driver_source_files ], + env: runutf8, +) diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am index c13a6831cc0..cf5cff4ea88 100644 --- a/src/network/Makefile.inc.am +++ b/src/network/Makefile.inc.am @@ -1,5 +1,4 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(NETWORK_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(NETWORK_DRIVER_SOURCES)) diff --git a/src/network/meson.build b/src/network/meson.build index 948dad39432..c33404dfd96 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -3,6 +3,8 @@ network_driver_sources = [ 'bridge_driver_platform.c', ] +driver_source_files += files(network_driver_sources) + network_leases_helper_sources = files( 'leaseshelper.c', ) diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am index 63d2548e11f..ddd906fa782 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -1,11 +1,5 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += \ - $(addprefix $(srcdir)/,$(NODE_DEVICE_DRIVER_SOURCES)) \ - $(addprefix $(srcdir)/,$(NODE_DEVICE_DRIVER_HAL_SOURCES)) \ - $(addprefix $(srcdir)/,$(NODE_DEVICE_DRIVER_UDEV_SOURCES)) \ - $(NULL) - STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(NODE_DEVICE_DRIVER_SOURCES)) \ $(NULL) diff --git a/src/node_device/meson.build b/src/node_device/meson.build index 437924466eb..0ac2aecf4f1 100644 --- a/src/node_device/meson.build +++ b/src/node_device/meson.build @@ -10,6 +10,8 @@ if conf.has('WITH_UDEV') node_device_driver_sources += 'node_device_udev.c' endif +driver_source_files += files(node_device_driver_sources) + if conf.has('WITH_NODE_DEVICES') node_device_driver_impl = static_library( 'virt_driver_nodedev_impl', diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index 4d34d7f3ad1..68bc42c2edf 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -1,5 +1,4 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(NWFILTER_DRIVER_SOURCES)) diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build index a05f0ce8fcf..c2c186903d8 100644 --- a/src/nwfilter/meson.build +++ b/src/nwfilter/meson.build @@ -6,6 +6,8 @@ nwfilter_driver_sources = [ 'nwfilter_learnipaddr.c', ] +driver_source_files += files(nwfilter_driver_sources) + if conf.has('WITH_NWFILTER') nwfilter_driver_impl = static_library( 'virt_driver_nwfilter_impl', diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index f665cb1f130..96265d2893b 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -1,4 +1,3 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(QEMU_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(QEMU_DRIVER_SOURCES)) diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 7bdaf6c19bd..c74acf9d14b 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -37,6 +37,8 @@ qemu_driver_sources = [ 'qemu_virtiofs.c', ] +driver_source_files += files(qemu_driver_sources) + qemu_dtrace_gen_headers = [] qemu_dtrace_gen_objects = [] diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am index a60a6b507f4..361305283a5 100644 --- a/src/secret/Makefile.inc.am +++ b/src/secret/Makefile.inc.am @@ -1,5 +1,4 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(SECRET_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(SECRET_DRIVER_SOURCES)) diff --git a/src/secret/meson.build b/src/secret/meson.build index 2245790f796..bbcd74ce309 100644 --- a/src/secret/meson.build +++ b/src/secret/meson.build @@ -2,6 +2,8 @@ secret_driver_sources = [ 'secret_driver.c', ] +driver_source_files += files(secret_driver_sources) + if conf.has('WITH_SECRETS') virt_modules += { 'name': 'virt_driver_secret', diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index d5438e8a71c..0834ac43a64 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -1,5 +1,4 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += \ $(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES)) diff --git a/src/storage/meson.build b/src/storage/meson.build index 59024746322..b14dcf969d9 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -8,6 +8,8 @@ storage_driver_sources = [ storage_driver_backend_sources, ] +driver_source_files += files(storage_driver_sources) + storage_backend_fs_sources = [ 'storage_backend_fs.c', ] diff --git a/src/vbox/Makefile.inc.am b/src/vbox/Makefile.inc.am deleted file mode 100644 index 6197c3172b5..00000000000 --- a/src/vbox/Makefile.inc.am +++ /dev/null @@ -1,6 +0,0 @@ -# vim: filetype=automake - -DRIVER_SOURCE_FILES += \ - $(addprefix $(srcdir)/,$(VBOX_DRIVER_SOURCES)) \ - $(srcdir)/vbox/vbox_tmpl.c \ - $(NULL) diff --git a/src/vbox/meson.build b/src/vbox/meson.build index b6dcee279b9..8451e3018be 100644 --- a/src/vbox/meson.build +++ b/src/vbox/meson.build @@ -10,6 +10,11 @@ vbox_driver_sources = [ 'vbox_XPCOMCGlue.c', ] +driver_source_files += files( + vbox_driver_sources, + 'vbox_tmpl.c', +) + if conf.has('WITH_VBOX') vbox_driver_impl = static_library( 'virt_driver_vbox_impl', diff --git a/src/vz/Makefile.inc.am b/src/vz/Makefile.inc.am index 380d1ffb839..eb6721fb135 100644 --- a/src/vz/Makefile.inc.am +++ b/src/vz/Makefile.inc.am @@ -1,4 +1,3 @@ # vim: filetype=automake -DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(VZ_DRIVER_SOURCES)) STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(VZ_DRIVER_SOURCES)) diff --git a/src/vz/meson.build b/src/vz/meson.build index 9e8ac3f8cfc..903e1f1359f 100644 --- a/src/vz/meson.build +++ b/src/vz/meson.build @@ -4,6 +4,8 @@ vz_driver_sources = [ 'vz_sdk.c', ] +driver_source_files += files(vz_driver_sources) + if conf.has('WITH_VZ') vz_driver_impl = static_library( 'virt_driver_vz_impl', -- 2.26.2