an issue with parsing $$
kylcho opened this issue · comments
Kati does not seem to handle below case.
func = lib$(1)$(2)
bar := -lc -lm
mylib:
@echo $(foo)
Expected output is
libc.so libm.so
Kati fails with following error.
makefile:3: *** unterminated call to function 'call': missing ')'.
make using using $(call func,c,.so) $(call func,m,.so)
for foo, while ckati is parsing it as $(call func,c,.so $(call func,m,.so
. I guess we'd need to do more parenthesis matching?
A workaround is to delay the evaluation of bar
, which gives the same result on make and ckati:
$(eval foo := $$(bar:-l%=$$(call func,%,.so)))
Thank you Dan.
When kati is parsing
Delayed expansion of bar variable as a workaround sounds right. I will try it