Alexandre Girao wrote:
a := 0
define aaa_template
a := 1
$(warning $(a))
endef
define bbb_template
$(warning $(a))
endef
$(eval $(call aaa_template)) # 0 (why 0?)
$(eval $(call bbb_template)) # 1
Because the aaa_template is expanded twice by $(eval). The first time
it's expanded you get the warning. Escape the $ with $$ in aaa_template
and you'll get the result you expect.
John.
--
John Graham-Cumming
[EMAIL PROTECTED]
Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/
POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/
Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make