help-make
[Top][All Lists]
Advanced

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

Re: function $(eval ...) in make 3.81 compared to 3.80


From: Jacques Klein
Subject: Re: function $(eval ...) in make 3.81 compared to 3.80
Date: Wed, 27 Jun 2007 12:13:47 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1

Thank's Philip G. for replying, here my comments:

First, I added the $(eval $(warning ....)) stuf just to convince myseft about how $$ is "evaluated", and for that mater, like you say, the outer $(eval is just a "no-op", ( it's my way-of-doing to debug $(eval stufffff). i.e check for correctness of first and second expansion rounds).

And you gave me the "correct hint" in order to understand the problem, "the semicolon bug" in 3.80, I "solved" some years ago with
backslashing.
Your solution which is to put the complete "target: ; command" line into a var works fine,
and I tested also the following one:

%sc := ;
$(eval target: $(%sc) command)

which is to just put the semicolon into a var (of course not necessairy with 3.81).

Finally, I think I prefer your solution, since it allows to write the complete rule in the "usual" way (multi-line with <TAB>command) by using define.

But most important is: the "double expansion" is definitivelly the "right way to reason" with $(eval ...)'s.





reply via email to

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