shell - Makefile - unterminated call to function `foreach': missing `)'. Stop -
this problem driving me nuts! here simple makefile:
sources = b c $(foreach var,$(sources),echo $(var);) all: @echo done with make 3.8, makefile:3: *** unterminated call function 'foreach': missing ')'. stop.
with make 3.81, makefile:3: *** missing separator. stop.
but, if put foreach line within 'all' target, runs fine. help!!
that foreach yield bunch of echo commands. can't have @ top level of makefile. use $(info) instead:
$(foreach var,$(sources),$(info $(var))) example:
$ make b c done
Comments
Post a Comment