[Top][All Lists]

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

Re: how to use $^ automatic variable with prerequisites built on target-

From: Axel
Subject: Re: how to use $^ automatic variable with prerequisites built on target-specific variable ?
Date: Mon, 12 Jul 2010 09:32:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5

Le 10/07/2010 08:12, Ralf Wildenhues a écrit :

Hello Axel,

This question is mainly about a GNU make feature (target-specific
variables) rather than about Automake (which doesn't understand this
feature).  So further questions are better asked on a mailing list about
GNU make such as help-make at  Note that Automake provides a
feature of a similar name but different semantics in that it allows for
per-target flags such as, when prog is a program to be built, you can

in order to override

I guess I should also note that Automake encourages using portable make.

Now to your actual question about target-specific variables: I think the
issue is that make expands makefiles in basically two stages: the list
of prerequisites is expanded before it is decided which targets to
remake.  I don't think the target-specific variables are expanded for
the prerequisite list expansion already, only for the rule commands of
some target (which you had to find out is too late for you).  I think
that `info make Target-specific' does not explain this very well, so you
might want to ask the GNU make maintainer about improving the manual a


Thanks for your answers, the two-pass processing would explain this behaviour.

And yes, I chose the wrong mailing-list, I jumped from the make manual pages to this mailing list without enough checks.


reply via email to

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