bug-make
[Top][All Lists]
Advanced

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

Re: Difficulties from the combination of functions "call" and "eval"


From: Paul Smith
Subject: Re: Difficulties from the combination of functions "call" and "eval"
Date: Sun, 18 Jan 2015 14:23:38 -0500

On Sun, 2015-01-18 at 13:07 -0600, Norbert Thiebaud wrote:
> >> Then $(eval) is the Wrong Thing.
> >
> > I hope not …
> 
> hope is not relevant... $(eval) _is_ the Wrong Thing(tm) for what you
> seems to want to do

The rule of thumb is, if you're using $(eval ...) inside a recipe,
you're doing something wrong.  $(eval ...) is for parsing MAKEFILE
content.  The recipe is passed to the SHELL.


There is only one situation I can think of where it _might_ make sense
to use $(eval ...) inside a recipe: if you want to assign a make
variable when the recipe is invoked.  But a real need for this is rare;
usually there are simpler and more straightforward ways to get the
result you're looking for.





reply via email to

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