Date: Sat, 08 Feb 2014 04:45:59 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: lev@FreeBSD.org Cc: freebsd-hackers@FreeBSD.org Subject: Re: Is it possible to get make variable without recursive expansion? Message-ID: <20140208.044559.1454108709341728013.hrs@allbsd.org> In-Reply-To: <12310461351.20140207203417@serebryakov.spb.ru> References: <12310461351.20140207203417@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Lev Serebryakov <lev@freebsd.org> wrote
in <12310461351.20140207203417@serebryakov.spb.ru>:
le> Hello, Freebsd-hackers.
le>
le>
le> Suppose, I have in my Makefile such construction:
le>
le> A=xxx
le> B=yyy
le> ANB=${A} and ${B}
le>
le> Is it possible to get value of ANB without recursive expansion, i.e. string
le> "${A} and ${B} and" in this case? I know, that all expansions are done at
le> last moment (If I don't use ":=" operator), but is it possible to block
le> second- and more-level expansion?
le>
le> I need to output "ANB=${ANB}" construction to external file without further
le> expansion...
This may be what you want but works only with bmake:
----Makefile----
A=xxx
B=yyy
ANB=${A} and ${B}
all:
@echo ANB=$$(make -VANB)
@echo ANB=$$(make .MAKE.EXPAND_VARIABLES=0 -VANB)
----Makefile----
-- Hiroki
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlL1N/cACgkQTyzT2CeTzy3TAgCglMznIFV853ySvsJ19DHSXlux
vdgAnjHp4dkjzoJWqW5u8Vof8r0X2iT/
=bTxK
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140208.044559.1454108709341728013.hrs>
