[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3.81 problem with $(eval function
From: |
Greg Chicares |
Subject: |
Re: 3.81 problem with $(eval function |
Date: |
Mon, 14 Mar 2011 14:00:11 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 2011-03-14 12:32Z, ali hagigat wrote:
>> On Mon, Mar 14, 2011 at 3:17 PM, Paul Smith <address@hidden> wrote:
>>> On Mon, 2011-03-14 at 14:20 +0330, ali hagigat wrote:
>>>> I tested make 3.81 with:
>>>> var1=1111
>>>> e12:
>>>> @echo $(eval $(call var1))
>>>>
>>>> /root/makefiles_examples> make -f makefile23
>>>> makefile23:3: *** missing separator. Stop.
>>>
>>> Correct. "1111" is not a legal makefile line.
>
> But why 1111 is not a legal makefile line? Please consider this:
> var1=1111
> e12:
> echo $(call var1)
> /root/makefiles_examples> make -f makefile23
> echo 1111
> 1111
"var1=1111" is a legal makefile line, but "1111" is not:
$cat Makefile
1111
$make
Makefile:1: *** missing separator. Stop.
In your makefiles, "$(call var1)" expands $(var1) to its value, "1111".
You can do this:
echo 1111
but you cannot do this:
$(eval 1111)
because "1111" is not a legal makefile line.