help-make
[Top][All Lists]
Advanced

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

Re: $(info ...) in variable, with expansion in recipes


From: Etan Reisner
Subject: Re: $(info ...) in variable, with expansion in recipes
Date: Fri, 4 Jul 2014 15:57:10 -0400

On Fri, Jul 4, 2014 at 3:36 PM, Philip Guenther <address@hidden> wrote:
> This combination of behaviors is caused by the requirement that variables
> set on the make command-line are exported to the environment for commands
> by default.
>
> For a normal recursively expanded variable, the value placed in the
> environment has to be expanded completely before being placed in the
> environment.  That expansion happens at the last moment, after the
> commands are expanded but before the shell is invoked.  That explains the
> original example.
>
> This can be confirmed by tell make that the RECIPE variable doesn't need
> to be exported.  If you add this line to the Makefile:
>     unexport RECIPE
>
> then the second '2' output goes away.

And all of a sudden it makes sense (as does the 'make' tag that
warning displayed that I couldn't make sense of).

    -Etan



reply via email to

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