On 10/10/07, Bryan Ischo <[EMAIL PROTECTED]> wrote:
>
> Hi all.  I am having a heck of a time getting the $(eval) function to do
> what I want with respect to a per-evaluation variable definition.

I tried your example and thought you need only do:

VARIABLE := VALUE

instead of:

VARIABLE = VALUE

in your *.mk files with $(VARIABLE) in the rule but that didn't work
for me.  I have a different suggestion.  I wonder if something like
the following will work for you.

---foo.mk---BEGIN
foo_VARIABLE = foo_variable
---foo.mk---END

---bar.mk---BEGIN
bar_VARIABLE = bar_variable
---bar.mk---END

---GNUmakefile---BEGIN
FRAGMENTS = foo bar

define PROCESS_FRAGMENT

-include $(1).mk

.PHONY: $(1)
$(1):
        @echo $$@
        @echo $$($(1)_VARIABLE)

endef

$(foreach i, $(FRAGMENTS), $(eval $(call PROCESS_FRAGMENT,$(i))))
---GNUmakefile---END

   Ken


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to