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

Re: [libvirt] [PATCHv2] build: consistently use CFLAGS



On 06/30/2011 07:29 PM, Laine Stump wrote:
On 06/30/2011 07:12 PM, Laine Stump wrote:
On 06/30/2011 02:09 PM, Eric Blake wrote:
According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
in automake 1.9.6) should only include -I, -D, and -U directives; more
generic directives like -Wall belong in CFLAGS since they affect more
phases of the build process.  Therefore, we should be sticking CFLAGS
additions into a CFLAGS container, not a CPPFLAGS container.

* src/Makefile.am (INCLUDES): Move CFLAGS items...
(AM_CFLAGS): ...to their proper location.
* python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
* tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
---

ACK.

I spoke too soon - this patch causes /usr/include/libxml2 to be lost from the include path, which breaks the build.

Okay, I found the problem. ACK with the following patch squashed in. (I checked all the other ..._CFLAGS in this particular Makefile and this was the only one missing AM_CFLAGS.

diff --git a/src/Makefile.am b/src/Makefile.am
index 2b6d0fb..4250f60 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -639,7 +639,7 @@ noinst_LTLIBRARIES += libvirt_driver_vmware.la
 libvirt_la_BUILT_LIBADD += libvirt_driver_vmware.la
 endif
 libvirt_driver_vmware_la_CFLAGS = \
-               -I top_srcdir@/src/conf -I top_srcdir@/src/vmx
+               -I top_srcdir@/src/conf -I top_srcdir@/src/vmx $(AM_CFLAGS)
 if WITH_DRIVER_MODULES
 libvirt_driver_vmware_la_LIBADD = ../gnulib/lib/libgnu.la
 libvirt_driver_vmware_la_LDFLAGS = -module -avoid-version


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