help-make
[Top][All Lists]
Advanced

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

Re: ifdef is always eval'ed


From: gaoyong pan
Subject: Re: ifdef is always eval'ed
Date: Mon, 28 Feb 2011 21:42:44 +0800

I read the make manual "eval" which expands the multiple lines
variable two times, so I fixed the issue by $$(info).

2011/2/28 gaoyong pan <address@hidden>:
> sorry, I meant getting this unexpected behavior.
>
> 2011/2/28 gaoyong pan <address@hidden>:
>> I don't define variable B for below makefile, but it always gets
>> printed and eval'ed with below outputs, why I got this expected
>> behavior?
>>
>> B is defined
>> template demo
>>
>> ===============
>> A := helloA
>> define change
>>  ifdef B
>>    $(info B is defined)
>>  endif
>> endef
>> $(eval $(change))
>> default:
>>  $(info template demo)
>> --
>> Best Regards
>> Linux user #384184
>> @ http://counter.li.org/
>>
>
>
>
> --
> Best Regards
> Linux user #384184
> @ http://counter.li.org/
>



-- 
Best Regards
Linux user #384184
@ http://counter.li.org/



reply via email to

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