[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with nested $(call ...) inside $(eval $(call ...)
From: |
gk |
Subject: |
problem with nested $(call ...) inside $(eval $(call ...) |
Date: |
Wed, 20 Nov 2002 11:56:01 -0800 |
I am having trouble understanding why the following macro 'rule2' is not
evaluating the way I expect.
Is this a bug? In what order are nested $(call ...) statements evaluated?
Thanks for any insights.
# makefile
# this works
define hello1
echo hello $(1)
endef
# this doesn't work
define hello2
echo hello $(call word,$(1))
endef
define word
$(1)
endef
define rule1
rule1:
@$$(call hello1,$(1))
endef
define rule2
rule2:
@$$(call hello2,$(1))
endef
$(eval $(call rule1,world))
$(eval $(call rule2,world))
# eof
address@hidden junk]$ make rule1
hello world
address@hidden junk]$ make rule2
Makefile:22: *** Insufficient number of arguments (1) to function
`word'. Stop.
- Greg Keraunen
- problem with nested $(call ...) inside $(eval $(call ...),
gk <=