On Sat, Jun 26, 2004 at 04:18:06PM -0500, Boris Kolpackov wrote:
> 
> Another patch, which I think you may be interested in, is
> pattern-specific-expansion.patch. Here is the description:
> 
>     The following makefile prints 'B' instead of 'A'.
> 
>       a := A
> 
>       %bar : arg := $a
>       %bar : ; @echo $(arg)
> 
>       a := B
> 
>       foobar:
> 
>     
>     The patch adds additional expansion at pattern definition 
>     point for simple variables (i.e. declared with :=). Also 
>     note that you can inhibit this additional expansion if 
>     you want to:
> 
> 
>       %bar : arg := $a $$a
> 
>    
>     With this change the makefile above prints 'A B'.
> 
> 
>From info make:
>>>>>>>>>>>>>>>>>>>>>
Rule Definition
---------------

   A rule is always expanded the same way, regardless of the form:

     IMMEDIATE : IMMEDIATE ; DEFERRED
        DEFERRED

   That is, the target and prerequisite sections are expanded
immediately, and the commands used to construct the target are always
deferred.
>>>>>>>>>>>>>>>>>>>>>>>

Given the above information from info make I agree with Boris on this.
Both 'a' and 'arg' should be considered IMMEDIATE according to the snippet
included.

        Sam


_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to