Based on how we generate protocol-structs files for checking
that our protocol changes are backwards-compatible, we end up
compiling lxc and lockd protocol files on all platforms during
'make check', even though we may never link those files into a
final library or executable. For this to work on cygwin, the
CFLAGS addition of $(XDR_CFLAGS) must be unconditional.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I'll wait for review rather than invoking build-breaker rule,
as 'make check' is a bit stronger than 'make'.
src/Makefile.am | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 99b4993..e2c3e47 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1305,6 +1305,19 @@ EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \
qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt
+libvirt_driver_lxc_impl_la_CFLAGS = \
+ $(LIBNL_CFLAGS) \
+ $(FUSE_CFLAGS) \
+ $(XDR_CFLAGS) \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
+ $(AM_CFLAGS)
+libvirt_driver_lxc_impl_la_LIBADD = \
+ $(CAPNG_LIBS) \
+ $(LIBNL_LIBS) \
+ $(LIBXML_LIBS) \
+ $(FUSE_LIBS)
+
if WITH_LXC
noinst_LTLIBRARIES += libvirt_driver_lxc_impl.la
libvirt_driver_lxc_la_SOURCES =
@@ -1319,19 +1332,6 @@ noinst_LTLIBRARIES += libvirt_driver_lxc.la
#libvirt_la_BUILT_LIBADD += libvirt_driver_lxc.la
endif ! WITH_DRIVER_MODULES
-libvirt_driver_lxc_impl_la_CFLAGS = \
- $(LIBNL_CFLAGS) \
- $(FUSE_CFLAGS) \
- $(XDR_CFLAGS) \
- -I$(srcdir)/access \
- -I$(srcdir)/conf \
- $(AM_CFLAGS)
-libvirt_driver_lxc_impl_la_LIBADD = \
- $(CAPNG_LIBS) \
- $(LIBNL_LIBS) \
- $(LIBXML_LIBS) \
- $(FUSE_LIBS)
-
if WITH_BLKID
libvirt_driver_lxc_impl_la_CFLAGS += $(BLKID_CFLAGS)
libvirt_driver_lxc_impl_la_LIBADD += $(BLKID_LIBS)
@@ -2307,15 +2307,16 @@ endif WITH_LXC
lockdriverdir = $(libdir)/libvirt/lock-driver
lockdriver_LTLIBRARIES =
+lockd_la_CFLAGS = -I$(srcdir)/conf \
+ $(XDR_CFLAGS) \
+ $(AM_CFLAGS)
+
if WITH_LIBVIRTD
lockdriver_LTLIBRARIES += lockd.la
lockd_la_SOURCES = \
$(LOCK_DRIVER_LOCKD_SOURCES) \
$(LOCK_PROTOCOL_GENERATED) \
$(NULL)
-lockd_la_CFLAGS = -I$(srcdir)/conf \
- $(XDR_CFLAGS) \
- $(AM_CFLAGS)
lockd_la_LDFLAGS = -module -avoid-version
lockd_la_LIBADD = ../gnulib/lib/libgnu.la \
libvirt-net-rpc.la \
--
2.4.3