help-make
[Top][All Lists]
Advanced

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

RE: why is indirect assignment inside eval, not working??


From: Paul Smith
Subject: RE: why is indirect assignment inside eval, not working??
Date: Wed, 10 Feb 2010 01:25:31 -0500

On Tue, 2010-02-09 at 22:07 -0800, Mark Galeck (CW) wrote:
> >no variable values in FOOBAR that you wanted to replace, you might as
> well not bother to use $(eval) anyway.
> 
> 
> All of this was just a simple example, that's why "it did not make
> sense", but that's where I boiled down the problem, from the larger
> example I was trying to work out.

The trick to using eval and call together is deciding which variable
references you want to be expanded by the call, and which should be
deferred and expanded during the eval.

The variable references you want expanded during the call (the first
thing to see the variables) should NOT be escaped, so that the call
expands them.

The ones you want expanded during the eval MUST be escaped, so that call
doesn't expand them; instead the eval (the second thing to see the
variables) expands them.

Sometimes it doesn't matter much, because the result would be the same
either way.  Other times, it matters a very great deal.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist





reply via email to

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