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 <[email protected]>          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



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to