%% Ted Stern <[EMAIL PROTECTED]> writes: ts> one.o := a/a/one.o ts> two.o := b/b/two.o ts> three.o := c/c/three.o ts> four.o := d/d/four.o ts> five.o := e/e/five.o
ts> ALL_BASE := one two three four five ts> define DEFINE_OBJ_LIST ts> $(1)_OBJS := $(foreach BASE,$(filter $(2)%,$(ALL_BASE)),$($(BASE).o)) ts> $(warning $(1)_OBJS (contains $(words $($(1)_OBJS)) objects) = $($(1)_OBJS)) ts> endef You're going to need to escape a lot of the "$" in this list. Remember that $(call ...) is going to evaluate this variable value first, before eval gets to it. When that happens the "first level" of unescaped "$" are expanded... _BEFORE_ eval gets there. Basically, leave the arguments to call (e.g., $(1), $(2), etc.) unescaped, and escape all the other "$" as "$$" (this is just a general rule; for example since $(ALL_BASE) is a constant you don't have to escape that, if you don't want to, etc.) -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-make
