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:47:45 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Jan Engelhardt wrote on Wed, Dec 10, 2008 at 04:32:24PM CET:
> On Wednesday 2008-12-10 16:04, Bob Friesenhahn wrote:
> >>> 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
> 
> Would it matter? Except for use of := (which I think is non-portable
> too), expansion of ${variables} will happen at the latest possible
> time, long after += has been parsed (linearly top-down probably).

Two issues: first, yes, the order can matter:

For example, you want to specify lib_LTLIBRARIES in the order in which
you want them installed, so that later libraries can depend on ones
listed earlier in the variable (yes, this is to work around an Automake
limitation, but that's not important for my point).

Second, with respect to late expansion, you are confusing 'automake'
and 'make' semantics.  Yes, 'make' will do late expansion as you say.
However, 'automake' already needs to look at some of the values of
variables, and may take specific action upon them.  This evaluation
done by 'automake' is of course done at the time 'automake' is run,
and strange things may happen if you, say, do things like
  make lib_LTLIBRARIES='libsome-new-name.la'

with a library name that has not been mentioned in the Makefile.am file.

Hope that helps.

Cheers,
Ralf




reply via email to

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