[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Named parameters in make?
From: |
John Dill |
Subject: |
Re: Named parameters in make? |
Date: |
Mon, 13 Jun 2011 09:54:55 -0400 |
Date: Sat, 11 Jun 2011 01:33:42 +0200
From: grischka <address@hidden>
Subject: Re: Named parameters in make?
Message-ID: <address@hidden>
Content-Type: text/plain; charset=UTF-8; format=flowed
>> Over my time using make I know I've read section 8.8 "The eval Function" a
>> number of times. But the implication of this sentence didn't hit me until I
>> saw your example:
>>
>> "The argument to the eval function is expanded, then the results of that
>> expansion are parsed as makefile syntax."
>
>Reason why eval is difficult to understand is that there is no good
>reason to have it, in the first place.
>
>For example one can write:
>
> all_rule = all : ; echo $$@
> $(all_rule)
>
>which expands the macro $(all_rule) and does parse the result as
>makefile syntax. That is everything said in the above statement,
>just without 'eval'.
The only use I have for using $(eval) directly is setting a variable within a
user-defined function, which is quite useful in some contexts.
set=$(eval $1:=$2)
I use this behavior of $(eval) quite frequently.
Best regards,
John D.
<<winmail.dat>>
- Re: Named parameters in make?, (continued)
- Re: Named parameters in make?, Lane Schwartz, 2011/06/10
- Re: Named parameters in make?, Lane Schwartz, 2011/06/10
- Re: Named parameters in make?, Philip Guenther, 2011/06/10
- Re: Named parameters in make?, Lane Schwartz, 2011/06/10
- Re: Named parameters in make?, Philip Guenther, 2011/06/10
- Re: Named parameters in make?, Lane Schwartz, 2011/06/10
Re: Named parameters in make?, Oleksandr Gavenko, 2011/06/10
Re: Named parameters in make?, grischka, 2011/06/11
Re: Named parameters in make?,
John Dill <=