The beta analysis of the root cause is correct, you do not avoid your $ calls $(warning) . Here's how I fix it:
define variable-def ifndef $1 $$(warning $1 is undefined) else $$(warning $1 is defined) endif endef FOO=bar $(eval $(call variable-def,FOO))
Please note that I am inserting spaces, not tabs. If you backtracked with tabs, you get this error: *** commands commence before first target. Stop. *** commands commence before first target. Stop.
This uses GNUisms, but also your sample (I think).
Jack kelly
source share