# vim: filetype=automake
-REMOTE_DAEMON_GENERATED = \
- remote/remote_daemon_dispatch_stubs.h \
- remote/lxc_daemon_dispatch_stubs.h \
- remote/qemu_daemon_dispatch_stubs.h \
- $(NULL)
-
-REMOTE_DAEMON_SOURCES = \
- remote/remote_daemon.c \
- remote/remote_daemon.h \
- remote/remote_daemon_config.c \
- remote/remote_daemon_config.h \
- remote/remote_daemon_dispatch.c \
- remote/remote_daemon_dispatch.h \
- remote/remote_daemon_stream.c \
- remote/remote_daemon_stream.h \
- $(NULL)
-
REMOTE_DAEMON_CFLAGS = \
$(AM_CFLAGS) \
$(GNUTLS_CFLAGS) \
remote/virtproxyd.confd \
$(NULL)
-REMOTE_PROTOCOL = $(srcdir)/remote/remote_protocol.x
-LXC_PROTOCOL = $(srcdir)/remote/lxc_protocol.x
-QEMU_PROTOCOL = $(srcdir)/remote/qemu_protocol.x
-REMOTE_DRIVER_PROTOCOL = \
- $(REMOTE_PROTOCOL) \
- $(QEMU_PROTOCOL) \
- $(LXC_PROTOCOL) \
- $(NULL)
-
-# Needed to build libvirt.pot, so must be listed outside
-# the WITH_REMOTE/WITH_LIBVIRTD conditionals
-BUILT_SOURCES += \
- $(REMOTE_DAEMON_GENERATED) \
- $(NULL)
-
if WITH_LIBVIRTD
sbin_PROGRAMS += libvirtd virtproxyd
virt-guest-shutdown.target: remote/virt-guest-shutdown.target.in \
$(top_builddir)/config.status
$(AM_V_GEN)cp $< $@
-
-
-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 \
- --mode=server remote REMOTE $(REMOTE_PROTOCOL) \
- > remote/remote_daemon_dispatch_stubs.h
-
-remote/lxc_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \
- $(LXC_PROTOCOL) Makefile.am
- $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
- --mode=server lxc LXC $(LXC_PROTOCOL) \
- > remote/lxc_daemon_dispatch_stubs.h
-
-remote/qemu_daemon_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \
- $(QEMU_PROTOCOL) Makefile.am
- $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
- --mode=server qemu QEMU $(QEMU_PROTOCOL) \
- > remote/qemu_daemon_dispatch_stubs.h
)
endforeach
+remote_daemon_sources = files(
+ 'remote_daemon.c',
+ 'remote_daemon_config.c',
+ 'remote_daemon_dispatch.c',
+ 'remote_daemon_stream.c',
+)
+
+remote_daemon_generated = []
+
+foreach name : [ 'remote', 'qemu', 'lxc' ]
+ protocol_x = '@0@_protocol.x'.format(name)
+ dispatch_h = '@0@_daemon_dispatch_stubs.h'.format(name)
+
+ remote_daemon_generated += custom_target(
+ dispatch_h,
+ input: protocol_x,
+ output: dispatch_h,
+ command: [
+ gendispatch_prog, '--mode=server', name, name.to_upper(), '@INPUT@',
+ ],
+ capture: true,
+ )
+endforeach
+
if conf.has('WITH_REMOTE')
remote_driver_lib = static_library(
'virt_remote_driver',