[libvirt PATCH 202/351] meson: src: build virtlogd daemon binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/logging/Makefile.inc.am | 64 -------------------------------------
 src/logging/meson.build     | 32 +++++++++++++++++++
 2 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am
index b88e0c8766e..8adec645d36 100644
--- a/src/logging/Makefile.inc.am
+++ b/src/logging/Makefile.inc.am
@@ -1,27 +1,5 @@
 # vim: filetype=automake
 
-LOG_PROTOCOL_GENERATED = \
-	logging/log_protocol.h \
-	logging/log_protocol.c \
-	$(NULL)
-
-LOG_DAEMON_GENERATED = \
-	logging/log_daemon_dispatch_stubs.h
-	$(NULL)
-
-LOG_DAEMON_SOURCES = \
-	logging/log_daemon.h \
-	logging/log_daemon.c \
-	logging/log_daemon_config.h \
-	logging/log_daemon_config.c \
-	logging/log_daemon_dispatch.c \
-	logging/log_daemon_dispatch.h \
-	logging/log_handler.c \
-	logging/log_handler.h \
-	$(NULL)
-
-LOG_PROTOCOL = $(srcdir)/logging/log_protocol.x
-
 SYSCONF_FILES += logging/virtlogd.sysconf
 
 VIRTLOGD_UNIT_FILES_IN = \
@@ -41,42 +19,6 @@ OPENRC_INIT_FILES_IN += \
 	$(NULL)
 
 if WITH_LIBVIRTD
-sbin_PROGRAMS += virtlogd
-
-
-virtlogd_SOURCES = \
-		$(LOG_DAEMON_SOURCES) \
-		$(NULL)
-nodist_virtlogd_SOURCES = \
-		$(LOG_PROTOCOL_GENERATED) \
-		$(LOG_DAEMON_GENERATED) \
-		$(NULL)
-virtlogd_CFLAGS = \
-		-I$(builddir)/logging \
-		-I$(builddir)/rpc \
-		$(AM_CFLAGS) \
-		$(XDR_CFLAGS) \
-		$(NULL)
-virtlogd_LDFLAGS = \
-		$(AM_LDFLAGS) \
-		$(XDR_LIBS) \
-		$(NO_UNDEFINED_LDFLAGS) \
-		$(NULL)
-virtlogd_LDADD = \
-		libvirt_driver_admin.la \
-		libvirt.la \
-		$(GLIB_LIBS) \
-		$(NULL)
-if WITH_DTRACE_PROBES
-virtlogd_LDADD += libvirt_probes.lo
-endif WITH_DTRACE_PROBES
-
-if WITH_SASL
-virtlogd_CFLAGS += \
-	$(SASL_CFLAGS) \
-	$(NULL)
-endif WITH_SASL
-
 conf_DATA += logging/virtlogd.conf
 
 augeas_DATA += logging/virtlogd.aug
@@ -88,12 +30,6 @@ logging/test_virtlogd.aug: logging/test_virtlogd.aug.in \
 
 endif WITH_LIBVIRTD
 
-logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \
-		$(srcdir)/rpc/gendispatch.pl Makefile.am
-	$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
-	    virLogManagerProtocol VIR_LOG_MANAGER_PROTOCOL \
-	    $(LOG_PROTOCOL) > logging/log_daemon_dispatch_stubs.h
-
 virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status
 	$(AM_V_GEN)$(SED) $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
 
diff --git a/src/logging/meson.build b/src/logging/meson.build
index 5d1f30ac08f..0e58bc9e6bd 100644
--- a/src/logging/meson.build
+++ b/src/logging/meson.build
@@ -24,6 +24,13 @@ log_protocol_generated += custom_target(
   ],
 )
 
+log_daemon_sources = files(
+  'log_daemon.c',
+  'log_daemon_config.c',
+  'log_daemon_dispatch.c',
+  'log_handler.c',
+)
+
 log_driver_lib = static_library(
   'virt_log_driver',
   [
@@ -38,3 +45,28 @@ log_driver_lib = static_library(
 )
 
 libvirt_libs += log_driver_lib
+
+if conf.has('WITH_LIBVIRTD')
+  log_daemon_generated = custom_target(
+    'log_daemon_dispatch_stubs.h',
+    input: log_protocol,
+    output: 'log_daemon_dispatch_stubs.h',
+    command: [
+      gendispatch_prog, '--mode=server',
+      'virLogManagerProtocol', 'VIR_LOG_MANAGER_PROTOCOL', '@INPUT@',
+    ],
+    capture: true,
+  )
+
+  virt_daemons += {
+    'name': 'virtlogd',
+    'sources': [
+      log_daemon_sources,
+      log_daemon_generated,
+      log_protocol_generated,
+    ],
+    'include': [
+      include_directories('.'),
+    ],
+  }
+endif
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux