[libvirt PATCH 201/351] meson: src: build virtlockd daemon binary

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

 



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

diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am
index 49cf0252162..20974dd0461 100644
--- a/src/locking/Makefile.inc.am
+++ b/src/locking/Makefile.inc.am
@@ -3,19 +3,6 @@
 LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \
 	locking/sanlock_helper.c
 
-LOCK_DAEMON_GENERATED = \
-	locking/lock_daemon_dispatch_stubs.h
-	$(NULL)
-
-LOCK_DAEMON_SOURCES = \
-	locking/lock_daemon.h \
-	locking/lock_daemon.c \
-	locking/lock_daemon_config.h \
-	locking/lock_daemon_config.c \
-	locking/lock_daemon_dispatch.c \
-	locking/lock_daemon_dispatch.h \
-	$(NULL)
-
 RPC_PROBE_FILES += $(srcdir)/locking/lock_protocol.x
 SYSCONF_FILES += locking/virtlockd.sysconf
 
@@ -47,42 +34,6 @@ if WITH_LIBXL
 nodist_conf_DATA += locking/libxl-lockd.conf
 endif WITH_LIBXL
 
-sbin_PROGRAMS += virtlockd
-
-virtlockd_SOURCES = \
-	$(LOCK_DAEMON_SOURCES) \
-	$(NULL)
-nodist_virtlockd_SOURCES = \
-	$(LOCK_PROTOCOL_GENERATED) \
-	$(LOCK_DAEMON_GENERATED) \
-	$(NULL)
-virtlockd_CFLAGS = \
-	-I$(srcdir)/locking \
-	-I$(builddir)/locking \
-	-I$(builddir)/rpc \
-	$(AM_CFLAGS) \
-	$(XDR_CFLAGS) \
-	$(NULL)
-virtlockd_LDFLAGS = \
-	$(AM_LDFLAGS) \
-	$(XDR_LIBS) \
-	$(NO_UNDEFINED_LDFLAGS) \
-	$(NULL)
-virtlockd_LDADD = \
-	libvirt.la \
-	libvirt_driver_admin.la \
-	$(GLIB_LIBS) \
-	$(NULL)
-if WITH_DTRACE_PROBES
-virtlockd_LDADD += libvirt_probes.lo
-endif WITH_DTRACE_PROBES
-
-if WITH_SASL
-virtlockd_CFLAGS += \
-	$(SASL_CFLAGS) \
-	$(NULL)
-endif WITH_SASL
-
 if WITH_SANLOCK
 augeas_DATA += locking/libvirt_sanlock.aug
 
@@ -169,12 +120,6 @@ locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf
 	cp $< $@
 
 
-locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \
-		$(srcdir)/rpc/gendispatch.pl Makefile.am
-	$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
-	    virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \
-	    $(LOCK_PROTOCOL) > locking/lock_daemon_dispatch_stubs.h
-
 virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status
 	$(AM_V_GEN)$(SED) $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
 
diff --git a/src/locking/meson.build b/src/locking/meson.build
index 4767ee9c869..cdd558779c2 100644
--- a/src/locking/meson.build
+++ b/src/locking/meson.build
@@ -30,6 +30,23 @@ lock_protocol_generated += custom_target(
   ],
 )
 
+lock_daemon_sources = files(
+  'lock_daemon.c',
+  'lock_daemon_config.c',
+  'lock_daemon_dispatch.c',
+)
+
+lock_daemon_generated = custom_target(
+  'lock_daemon_dispatch_stubs.h',
+  input: lock_protocol,
+  output: 'lock_daemon_dispatch_stubs.h',
+  command: [
+    gendispatch_prog, '--mode=server',
+    'virLockSpaceProtocol', 'VIR_LOCK_SPACE_PROTOCOL', '@INPUT@',
+  ],
+  capture: true,
+)
+
 sanlock_sources = [
   'lock_driver_sanlock.c',
 ]
@@ -100,4 +117,16 @@ if conf.has('WITH_LIBVIRTD')
       'install_dir': lockdriver_dir,
     }
   endif
+
+  virt_daemons += {
+    'name': 'virtlockd',
+    'sources': [
+      lock_daemon_sources,
+      lock_daemon_generated,
+      lock_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