On Wed, 2007-09-26 at 22:49 +0200, Ramón García wrote:
> If I understand well the issue is when an automatic variable is
> invoked in := rule, independently of whether it is in atarget context
> or not. If one writes
>
> a.c: a.o
> a.c: var := $<
> a.c: defs.h
>
> var would have exactly the same issue: its current value is not valid.
Indeed you are exactly right. My comment was because in the patch you
sent there was some code to initialize the automatic variables for
target A if there was a reference to $(A::var). I don't think that this
code is necessary, or even a good idea. If the automatic variables are
not initialized for A, then expanding $(A::<) (etc.) should yield the
empty string, just like $< etc.
Or, am I missing something?
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@xxxxxxx> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
|