help-make
[Top][All Lists]
Advanced

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

need help understanding $(eval ...) variable expansion


From: gk
Subject: need help understanding $(eval ...) variable expansion
Date: Mon, 25 Nov 2002 18:48:28 -0800

Can anyone explain how to assign the value of $(a) in the following makefile?
This is a simplified version of what I am trying to do: I need to perform filtering on the input $(1) so I cannot simply substitue $(1) for $(a) in the following example.

# makefile
define macro

a:=$(1)
a-copy:=$(a)
a-reference=$(a)
$(eval a-copy-eval:=$(a))
$(eval a-reference-eval=$(a))

foo:
        @echo 'a=$$(a)'
        @echo 'a-copy=$$(a-copy)'
        @echo 'a-reference=$$(a-reference)'
        @echo 'a-copy-eval=$$(a-copy-eval)'
        @echo 'a-reference-eval=$$(a-reference-eval)'
endef # XMake_outfileRule

$(eval $(call macro,hello))
# eof

- Greg Keraunen





reply via email to

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