On 2004-02-17 23:50 -0500, Paul D. Smith wrote:
> %% Andre Majorel <[EMAIL PROTECTED]> writes:
>
> >> You have to use eval.
>
> am> Couldn't he write:
>
> am> define newline
>
>
> am> endef
>
> am> $(foreach program,$(PROGRAMS),$(program): $($(program)_OBJ)$(newline))
>
> am> ?
>
> No. You can try it and see that it doesn't work.
Sorry. I learned that one minute after hitting [y]. :-)
> A single line of a makefile is interpreted to be a single line of a
> makefile, even if the expansion includes newlines.
Not for recipes, apparently:
all:
$(foreach f,a b,echo $(f)1$(newline)echo $(f)2$(newline))
$ make all
echo a1
a1
echo a2
a2
echo b1
b1
echo b2
b2
Why it works for generating recipes and not for target-dependencies
lines, is a complete mystery to me.
--
Andr� Majorel <[EMAIL PROTECTED]>
http://www.teaser.fr/~amajorel/
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make