automake
[Top][All Lists]
Advanced

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

Re: GNU Make Extensions


From: Ralf Wildenhues
Subject: Re: GNU Make Extensions
Date: Wed, 10 Dec 2008 20:42:59 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Bob,

* Bob Friesenhahn wrote on Wed, Dec 10, 2008 at 04:04:23PM CET:
> On Wed, 10 Dec 2008, Tom Browder wrote:
>>> * Tom Browder wrote on Wed, Dec 10, 2008 at 01:38:53AM CET:
>>>> Is it "legal" to use the "+=" operator in lieu of "\" when listing
>>>> members of a variable in Makefile.am's?
>>>
>>> Yes.  In this case, an Automake extension over portable make syntax,
>>> i.e., automake will flatten the += and 'make' won't ever see it.
>
> I didn't really trust += in my own Automake makefiles since it was not  
> really clear to me in what order the appending would occur and since I  
> am also using Automake includes, the ordering might get changed in some 
> bad way if the include order is changed.  So for my makefiles I used 
> additional variables with explicit concatenation, leaving nothing to 
> chance.

With +=, the order is kept as you specify it.  Even with conditionals in
the loop, as in

foo = a
if COND
foo += b
else
foo += c d
endif
foo += e

There used to be issues in this area, but they have been fixed for quite
some time (see NEWS if you need details).

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]