This is one of the confusing things about using call
and eval
together: when to add extra quoting. The problem is that the call
function is invoked first, and that will expand the argument once. Then eval
is called and that evaluates its argument (the output from call
).
In your example, the info
function is being evaluated by call
, the first time, and so in that situation a
has not been set yet (because it's not set until the eval
function runs). So you need to escape that function, and the expansion of a
:
define t1
a = $1
$$(info $$(a) -- $(1))
endef