Hilko Bengen
2011-Dec-01 21:06 UTC
[Libguestfs] [PATCH] libguestfs: Added gnulib includes from builddir, as suggested by the Gnulib documentation
Since some modules (`getopt', for example) may copy files
into the build directory, `top_builddir/lib' is needed as well as
`top_srcdir/lib'. -- GNU Gnulib manual, section 2.2 Initial import
---
capitests/Makefile.am | 1 +
daemon/Makefile.am | 2 +-
src/Makefile.am | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/capitests/Makefile.am b/capitests/Makefile.am
index cb9188e..d32b7fc 100644
--- a/capitests/Makefile.am
+++ b/capitests/Makefile.am
@@ -129,6 +129,7 @@ test_debug_to_file_SOURCES = test-debug-to-file.c
test_debug_to_file_CFLAGS = \
-I$(top_srcdir)/src -I$(top_builddir)/src \
-I$(top_srcdir)/gnulib/lib \
+ -I$(top_builddir)/gnulib/lib \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
test_debug_to_file_LDADD = \
$(top_builddir)/src/libguestfs.la \
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index c4a30bc..71d6a63 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -176,7 +176,7 @@ guestfsd_LDADD = \
$(LIBINTL) \
$(SERVENT_LIB)
-guestfsd_CPPFLAGS = -I$(top_srcdir)/gnulib/lib
+guestfsd_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
guestfsd_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
.PHONY: force
diff --git a/src/Makefile.am b/src/Makefile.am
index 761fcb6..82a4004 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -165,7 +165,7 @@ libguestfs_la_CFLAGS = \
$(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS)
-libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib
+libguestfs_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib
-I$(top_builddir)/gnulib/lib
if HAVE_RPCGEN
guestfs_protocol.c: guestfs_protocol.x
--
1.7.7.3
Richard W.M. Jones
2011-Dec-01 23:48 UTC
[Libguestfs] [PATCH] libguestfs: Added gnulib includes from builddir, as suggested by the Gnulib documentation
Thanks -- I tested it and it seems to work fine. ACKed and pushed. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Apparently Analagous Threads
- [PATCH] hivex: Added gnulib includes from builddir, as suggested by the Gnulib documentation; link hivexml against libgnu.
- use gnulib, and begin to pass its "make syntax-check" tests
- [PATCH] Add a test for an executable stack in libguestfs.so
- [PATCH 4/4] build: enable gcc warnings in capitests/ and ocaml/
- fix new failures from latest-from-gnulib syntax-check