]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: split driver_storage into convenience library
authorEric Blake <eblake@redhat.com>
Tue, 21 Aug 2012 12:50:28 +0000 (06:50 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 21 Aug 2012 15:44:14 +0000 (09:44 -0600)
Commit 1d22ba95 was complete at the time, but we have since
reintroduced a warning that is fixed in the same manner:

  CCLD   storagebackendsheepdogtest

*** Warning: Linking the executable storagebackendsheepdogtest against the loadable module
*** libvirt_driver_storage.so is not portable!

* src/Makefile.am (libvirt_driver_storage.la): Factor into new
convenience library libvirt_driver_storage_impl.la.
* tests/Makefile.am (storagebackendsheepdogtest_LDADD): Link to
convenience library, not shared library.

src/Makefile.am
tests/Makefile.am

index e90be304f2e5bbae0f977ccaced3744852cae641..152ee5b7a47c1c4edb17ffacd3963327a71e3ce7 100644 (file)
@@ -1050,66 +1050,67 @@ libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
 endif
 
 # Needed to keep automake quiet about conditionals
-libvirt_driver_storage_la_SOURCES =
-libvirt_driver_storage_la_CFLAGS = \
+libvirt_driver_storage_impl_la_SOURCES =
+libvirt_driver_storage_impl_la_CFLAGS = \
                -I$(top_srcdir)/src/conf $(AM_CFLAGS)
-libvirt_driver_storage_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_driver_storage_la_LIBADD =
+libvirt_driver_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
+libvirt_driver_storage_impl_la_LIBADD =
 if WITH_SECDRIVER_SELINUX
-libvirt_driver_storage_la_LIBADD += $(SELINUX_LIBS)
+libvirt_driver_storage_impl_la_LIBADD += $(SELINUX_LIBS)
 endif
 if WITH_SECDRIVER_APPARMOR
-libvirt_driver_storage_la_LIBADD += $(APPARMOR_LIBS)
+libvirt_driver_storage_impl_la_LIBADD += $(APPARMOR_LIBS)
 endif
 if HAVE_LIBBLKID
-libvirt_driver_storage_la_CFLAGS += $(BLKID_CFLAGS)
-libvirt_driver_storage_la_LIBADD += $(BLKID_LIBS)
+libvirt_driver_storage_impl_la_CFLAGS += $(BLKID_CFLAGS)
+libvirt_driver_storage_impl_la_LIBADD += $(BLKID_LIBS)
 endif
 if WITH_STORAGE
+noinst_LTLIBRARIES += libvirt_driver_storage_impl.la
+libvirt_driver_storage_la_SOURCES =
+libvirt_driver_storage_la_LIBADD = libvirt_driver_storage_impl.la
 if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_storage.la
+libvirt_driver_storage_la_LIBADD += ../gnulib/lib/libgnu.la
+libvirt_driver_storage_la_LDFOAGS = -module -avoid-version
 else
 noinst_LTLIBRARIES += libvirt_driver_storage.la
 # Stateful, so linked to daemon instead
 #libvirt_la_BUILT_LIBADD += libvirt_driver_storage.la
 endif
-if WITH_DRIVER_MODULES
-libvirt_driver_storage_la_LIBADD += ../gnulib/lib/libgnu.la
-libvirt_driver_storage_la_LDFLAGS += -module -avoid-version
-endif
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_FS_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_FS_SOURCES)
 endif
 
 if WITH_STORAGE_LVM
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_LVM_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_LVM_SOURCES)
 endif
 
 if WITH_STORAGE_ISCSI
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_ISCSI_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_ISCSI_SOURCES)
 endif
 
 if WITH_STORAGE_SCSI
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_SCSI_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SCSI_SOURCES)
 endif
 
 if WITH_STORAGE_MPATH
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_MPATH_SOURCES)
-libvirt_driver_storage_la_CFLAGS += $(DEVMAPPER_CFLAGS)
-libvirt_driver_storage_la_LIBADD += $(DEVMAPPER_LIBS)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_MPATH_SOURCES)
+libvirt_driver_storage_impl_la_CFLAGS += $(DEVMAPPER_CFLAGS)
+libvirt_driver_storage_impl_la_LIBADD += $(DEVMAPPER_LIBS)
 endif
 
 if WITH_STORAGE_DISK
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_DISK_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_DISK_SOURCES)
 endif
 
 if WITH_STORAGE_RBD
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_RBD_SOURCES)
-libvirt_driver_storage_la_LIBADD += $(LIBRBD_LIBS)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_RBD_SOURCES)
+libvirt_driver_storage_impl_la_LIBADD += $(LIBRBD_LIBS)
 endif
 
 if WITH_STORAGE_SHEEPDOG
-libvirt_driver_storage_la_SOURCES += $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
+libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
 endif
 
 if WITH_NODE_DEVICES
index e97a487ca3f87d2be8248873394a7383a25735f2..8cf80155989acc8b9b29ef22069cff238548e631 100644 (file)
@@ -412,7 +412,8 @@ if WITH_STORAGE_SHEEPDOG
 storagebackendsheepdogtest_SOURCES = \
        storagebackendsheepdogtest.c \
        testutils.c testutils.h
-storagebackendsheepdogtest_LDADD = ../src/libvirt_driver_storage.la $(LDADDS)
+storagebackendsheepdogtest_LDADD = \
+       ../src/libvirt_driver_storage_impl.la $(LDADDS)
 else
 EXTRA_DIST += storagebackendsheepdogtest.c
 endif