[libvirt PATCH 192/351] meson: src: build libvirt_storage_backend_sheepdog.so shared module

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:57:08 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 src/Makefile.am             |  1 -
 src/storage/Makefile.inc.am | 30 ------------------------------
 src/storage/meson.build     | 25 +++++++++++++++++++++++++
 3 files changed, 25 insertions(+), 31 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index e309a96cbb3..ec6da9a6ff5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,6 @@
 nodist_conf_DATA =
 DRIVER_SOURCE_FILES =
 STATEFUL_DRIVER_SOURCE_FILES =
-noinst_LTLIBRARIES =
 INSTALL_DATA_DIRS =
 INSTALL_DATA_LOCAL =
 UNINSTALL_LOCAL =
diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am
index b52a9e79e63..ebb700eb160 100644
--- a/src/storage/Makefile.inc.am
+++ b/src/storage/Makefile.inc.am
@@ -1,11 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_SHEEPDOG_SOURCES = \
-	storage/storage_backend_sheepdog.h \
-	storage/storage_backend_sheepdog.c \
-	storage/storage_backend_sheepdog_priv.h \
-	$(NULL)
-
 STORAGE_DRIVER_GLUSTER_SOURCES = \
 	storage/storage_backend_gluster.h \
 	storage/storage_backend_gluster.c \
@@ -118,30 +112,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_SHEEPDOG
-libvirt_storage_backend_sheepdog_la_SOURCES = \
-	$(STORAGE_DRIVER_SHEEPDOG_SOURCES)
-libvirt_storage_backend_sheepdog_la_CFLAGS = \
-	-I$(srcdir)/conf \
-	$(AM_CFLAGS) \
-	$(NULL)
-
-libvirt_storage_backend_sheepdog_priv_la_SOURCES = \
-	$(STORAGE_DRIVER_SHEEPDOG_SOURCES)
-libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \
-	-I$(srcdir)/conf \
-	$(AM_CFLAGS) \
-	$(NULL)
-noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog_priv.la
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
-libvirt_storage_backend_sheepdog_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-libvirt_storage_backend_sheepdog_la_LIBADD = \
-	libvirt.la \
-	$(GLIB_LIBS) \
-	$(NULL)
-endif WITH_STORAGE_SHEEPDOG
-
 if WITH_STORAGE_GLUSTER
 libvirt_storage_backend_gluster_la_SOURCES = \
 	$(STORAGE_DRIVER_GLUSTER_SOURCES)
diff --git a/src/storage/meson.build b/src/storage/meson.build
index 3663b530d69..ae36f3e829e 100644
--- a/src/storage/meson.build
+++ b/src/storage/meson.build
@@ -44,6 +44,10 @@ storage_backend_scsi_sources = [
   'storage_backend_scsi.c',
 ]
 
+storage_backend_sheepdog_sources = [
+  'storage_backend_sheepdog.c',
+]
+
 storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
 storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
 
@@ -169,3 +173,24 @@ if conf.has('WITH_STORAGE_SCSI')
     'install_dir': storage_backend_install_dir,
   }
 endif
+
+if conf.has('WITH_STORAGE_SHEEPDOG')
+  storage_backend_sheepdog_priv_lib = static_library(
+    'virt_storage_backend_sheepdog_priv',
+    storage_backend_sheepdog_sources,
+    dependencies: [
+      src_dep,
+    ],
+    include_directories: [
+      conf_inc_dir,
+    ],
+  )
+
+  virt_modules += {
+    'name': 'virt_storage_backend_sheepdog',
+    'link_whole': [
+      storage_backend_sheepdog_priv_lib,
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+endif
-- 
2.26.2




More information about the libvir-list mailing list