This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AM_CPPFLAGS vs INCLUDES


On Tue, 25 Nov 2003, Alexandre Duret-Lutz wrote:

> >>> "Bob" == Bob Friesenhahn <bfriesen@simple.dallas.tx.us> writes:
>
>  Bob> The Automake documentation claims that 'INCLUDES' is the
>  Bob> equivalent of 'AM_CPPFLAGS'.  However, I find that this is
>  Bob> not the case at all.  If AM_CPPFLAGS is used, then any
>  Bob> per-target CPPFLAGS option completely overrides it.
>
> Thanks for pointing this out.  I'm checking this in.

My point was not entirely that the documentation was wrong.  It is an
extremely useful capability to be able to define a common base set of
CPPFLAGS and then use per-target CPPFLAGS to extend these (equivalent
to +=).  Otherwise the Makefile.am has to be very messy and large,
since as soon as you add one per-target CPPFLAGS, you then need to
start passing all CPPFLAGS via individual per-target CPPFLAGS

The current operation of INCLUDES in conjunction with per-target
CPPFLAGS is effectively

INCLUDES=$(CPPFLAGS)
TARGET_INCLUDES=$(INCLUDES) $(TARGET_CPPFLAGS)

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]