help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does eval actually work?


From: Michael Turner
Subject: Does eval actually work?
Date: Sat, 13 Sep 2003 14:33:18 +0900

I can't seem to get eval doing what it's supposed to do.

Here's a very simple test case:

----
define DOIT
$(1): ; touch $(1)
endef

$(eval $(call DOIT,x))

targ: x
----

As I understand eval, this should add "x: ; touch x" to the rules.  Instead,
what I get is this:

  gmake: *** No rule to make target `x', needed by `targ'.

Using just $(call DOIT,x) works fine.  However, I'm trying do something
more like

 $(foreach p,$(LIST),$(eval $(call DOIT,$(p))))

and it seems I really need eval to work to circumvent what may be
another bug: poor handling of newlines in expansion.  But if eval
doesn't work ....

I'm running gmake 3.79.1 so maybe this is something that's since
been fixed?  (I tried looking through the Savannah buglist but
unfortunately, there doesn't seem to be any full-text search,
and I gave up.  Any and all help appreciated.

Regards,
Michael Turner
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]