Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/meson.build | 2 ++ src/remote/Makefile.inc.am | 68 -------------------------------------- src/remote/meson.build | 59 +++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 68 deletions(-) create mode 100644 src/remote/meson.build diff --git a/src/meson.build b/src/meson.build index 2297721e58b..637f86b5ee4 100644 --- a/src/meson.build +++ b/src/meson.build @@ -86,6 +86,8 @@ subdir('cpu') subdir('hypervisor') subdir('vmx') +subdir('remote') + subdir('admin') subdir('locking') subdir('logging') diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 341f429b773..1dff8ec67e1 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -1,22 +1,5 @@ # vim: filetype=automake -REMOTE_DRIVER_GENERATED = \ - remote/remote_protocol.c \ - remote/remote_protocol.h \ - remote/remote_client_bodies.h \ - remote/lxc_protocol.c \ - remote/lxc_protocol.h \ - remote/lxc_client_bodies.h \ - remote/qemu_protocol.c \ - remote/qemu_protocol.h \ - remote/qemu_client_bodies.h \ - $(NULL) - -REMOTE_DRIVER_SOURCES = \ - remote/remote_driver.c \ - remote/remote_driver.h \ - $(NULL) - REMOTE_DAEMON_GENERATED = \ remote/remote_daemon_dispatch_stubs.h \ remote/lxc_daemon_dispatch_stubs.h \ @@ -144,39 +127,6 @@ REMOTE_DRIVER_PROTOCOL = \ $(LXC_PROTOCOL) \ $(NULL) -DRIVER_SOURCE_FILES += \ - $(REMOTE_DRIVER_GENERATED) \ - $(addprefix $(srcdir)/,$(REMOTE_DRIVER_SOURCES)) - -if WITH_REMOTE -noinst_LTLIBRARIES += libvirt_driver_remote.la -libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la -libvirt_driver_remote_la_CFLAGS = \ - $(XDR_CFLAGS) \ - -I$(srcdir)/conf \ - -I$(srcdir)/rpc \ - -I$(builddir)/rpc \ - -I$(builddir)/remote \ - $(AM_CFLAGS) \ - $(NULL) -libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_remote_la_SOURCES = \ - $(REMOTE_DRIVER_SOURCES) -nodist_libvirt_driver_remote_la_SOURCES = \ - $(REMOTE_DRIVER_GENERATED) - -if WITH_DTRACE_PROBES -nodist_libvirt_driver_remote_la_SOURCES += libvirt_probes.h -endif WITH_DTRACE_PROBES - -if WITH_SASL -libvirt_driver_remote_la_CFLAGS += \ - $(SASL_CFLAGS) \ - $(NULL) -endif WITH_SASL - -endif WITH_REMOTE - if WITH_REMOTE USED_SYM_FILES += $(srcdir)/libvirt_remote.syms else ! WITH_REMOTE @@ -420,24 +370,6 @@ virt-guest-shutdown.target: remote/virt-guest-shutdown.target.in \ $(AM_V_GEN)cp $< $@ -remote/remote_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ - $(REMOTE_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ - remote REMOTE $(REMOTE_PROTOCOL) \ - > remote/remote_client_bodies.h - -remote/lxc_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ - $(LXC_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ - lxc LXC $(LXC_PROTOCOL) \ - > remote/lxc_client_bodies.h - -remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatch.pl \ - $(QEMU_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \ - qemu QEMU $(QEMU_PROTOCOL) \ - > remote/qemu_client_bodies.h - remote/remote_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \ $(REMOTE_PROTOCOL) Makefile.am $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ diff --git a/src/remote/meson.build b/src/remote/meson.build new file mode 100644 index 00000000000..383b265ea21 --- /dev/null +++ b/src/remote/meson.build @@ -0,0 +1,59 @@ +remote_driver_sources = [ + 'remote_driver.c', +] + +remote_driver_generated = [] + +foreach name : [ 'remote', 'qemu', 'lxc' ] + client_bodies_h = '@0@_client_bodies.h'.format(name) + protocol_c = '@0@_protocol.c'.format(name) + protocol_h = '@0@_protocol.h'.format(name) + protocol_x = '@0@_protocol.x'.format(name) + + remote_driver_generated += custom_target( + client_bodies_h, + input: protocol_x, + output: client_bodies_h, + command: [ + gendispatch_prog, '--mode=client', name, name.to_upper(), '@INPUT@', + ], + capture: true, + ) + + remote_driver_generated += custom_target( + protocol_h, + input: protocol_x, + output: protocol_h, + command: [ + genprotocol_prog, rpcgen_prog, '-h', '@INPUT@', '@OUTPUT@', + ], + ) + + remote_driver_generated += custom_target( + protocol_c, + input: protocol_x, + output: protocol_c, + command: [ + genprotocol_prog, rpcgen_prog, '-c', '@INPUT@', '@OUTPUT@', + ], + ) +endforeach + +if conf.has('WITH_REMOTE') + remote_driver_lib = static_library( + 'virt_remote_driver', + [ + remote_driver_sources, + remote_driver_generated, + ], + dependencies: [ + rpc_dep, + sasl_dep, + src_dep, + xdr_dep, + ], + include_directories: [ + conf_inc_dir, + ], + ) +endif -- 2.26.2