[Mesa-dev] [PATCH 1/7] i965: use AM_CPPFLAGS instead of AM_CFLAGS/CXXFLAGS

Gaetan Nadon memsize at videotron.ca
Wed Jan 18 10:38:38 PST 2012


On 12-01-18 01:11 PM, Eric Anholt wrote:
> On Tue, 17 Jan 2012 15:58:11 -0500, Matt Turner <mattst88 at gmail.com> wrote:
>
> As far as I can tell, the point of AM_CPPFLAGS existing is if you want
> to make a target that separately calls the preprocessor, so you a list
> of includes and a list of non-preprocessor compiler flags.  Given that
> we don't have any preprocessor invocations, we're sure to leak actual
> cflags into the cppflags, so I don't see why we'd make this change..
That's the only scenario I am aware of that will actually "break". You
never know when this target might be added in the makefile. It's
preferable to keep the flags separate where possible. Automake keeps
them separate from top to bottom. A builder can append flags at make
invocation using CFLAGS and CPPFLAGS, knowing they will used with the
correct target.

Unfortunately too many developers don't bother and when mixed flags are
passed in through a variable from another module, they cannot be
separated again.

In another post, I expressed my reservations due to INTEL_CFLAGS that
may contain mixed flags. Using AM_CFLAGS would be safer, unfortunately.


More information about the mesa-dev mailing list