Is it possible to get make variable without recursive expansion?

Lev Serebryakov lev at FreeBSD.org
Fri Feb 7 18:52:14 UTC 2014


Hello, Alfred.
You wrote 7 февраля 2014 г., 22:25:30:

AP> On 2/7/14 8:34 AM, Lev Serebryakov wrote:
>> Hello, Freebsd-hackers.
>>
>>
>>   Suppose, I have in my Makefile such construction:
>>
>> A=xxx
>> B=yyy
>> ANB=${A} and ${B}
>>
>>   Is it possible to get value of ANB without recursive expansion, i.e. string
>> "${A} and ${B} and" in this case? I know, that all expansions are done at
>> last moment (If I don't use ":=" operator), but is it possible to block
>> second- and more-level expansion?
>>
>>   I need to output "ANB=${ANB}" construction to external file without further
>> expansion...
>>
AP> a:
AP>          echo "AMB=\$${AMB}"
 It will echo "AMB=${AMB}" as-is, as far as I understand, it is simple. And I need to get
"ANB=${A} and ${B}" output.



-- 
// Black Lion AKA Lev Serebryakov <lev at FreeBSD.org>



More information about the freebsd-hackers mailing list