[libvirt PATCH 144/351] meson: src: build libvirt_driver_log.a static library

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/logging/Makefile.inc.am | 21 --------------------
 src/logging/meson.build     | 38 +++++++++++++++++++++++++++++++++++++
 src/meson.build             |  1 +
 3 files changed, 39 insertions(+), 21 deletions(-)
 create mode 100644 src/logging/meson.build

diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am
index 9aa634b126b..b88e0c8766e 100644
--- a/src/logging/Makefile.inc.am
+++ b/src/logging/Makefile.inc.am
@@ -9,11 +9,6 @@ LOG_DAEMON_GENERATED = \
 	logging/log_daemon_dispatch_stubs.h
 	$(NULL)
 
-LOG_DRIVER_SOURCES = \
-	logging/log_manager.c \
-	logging/log_manager.h \
-	$(NULL)
-
 LOG_DAEMON_SOURCES = \
 	logging/log_daemon.h \
 	logging/log_daemon.c \
@@ -45,22 +40,6 @@ OPENRC_INIT_FILES_IN += \
 	logging/virtlogd.init.in \
 	$(NULL)
 
-noinst_LTLIBRARIES += libvirt_driver_log.la
-
-libvirt_la_BUILT_LIBADD += libvirt_driver_log.la
-libvirt_driver_log_la_SOURCES = \
-	$(LOG_DRIVER_SOURCES) \
-	$(NULL)
-nodist_libvirt_driver_log_la_SOURCES = \
-	$(LOG_PROTOCOL_GENERATED) \
-	$(NULL)
-libvirt_driver_log_la_CFLAGS = \
-	-I$(builddir)/logging \
-	-I$(builddir)/rpc \
-	$(AM_CFLAGS) \
-	$(XDR_CFLAGS) \
-	$(NULL)
-
 if WITH_LIBVIRTD
 sbin_PROGRAMS += virtlogd
 
diff --git a/src/logging/meson.build b/src/logging/meson.build
new file mode 100644
index 00000000000..a9c30efe063
--- /dev/null
+++ b/src/logging/meson.build
@@ -0,0 +1,38 @@
+log_driver_sources = [
+  'log_manager.c',
+]
+
+log_protocol = 'log_protocol.x'
+
+log_protocol_generated = []
+
+log_protocol_generated += custom_target(
+  'log_protocol.h',
+  input: log_protocol,
+  output: 'log_protocol.h',
+  command: [
+    genprotocol_prog, rpcgen_prog, '-h', '@INPUT@', '@OUTPUT@'
+  ],
+)
+
+log_protocol_generated += custom_target(
+  'log_protocol.c',
+  input: log_protocol,
+  output: 'log_protocol.c',
+  command: [
+    genprotocol_prog, rpcgen_prog, '-c', '@INPUT@', '@OUTPUT@'
+  ],
+)
+
+log_driver_lib = static_library(
+  'virt_log_driver',
+  [
+    log_driver_sources,
+    log_protocol_generated,
+  ],
+  dependencies: [
+    rpc_dep,
+    src_dep,
+    xdr_dep,
+  ],
+)
diff --git a/src/meson.build b/src/meson.build
index 96e49f2059c..2297721e58b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -88,6 +88,7 @@ subdir('vmx')
 
 subdir('admin')
 subdir('locking')
+subdir('logging')
 
 subdir('esx')
 subdir('hyperv')
-- 
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