Say I have a list with some elements:

FACTORS = form pos cluster

I would like to enumerate the elements in the list, i.e. for each element, 
create a variable with the element's name and the list index as the value.

I have tried this:

i=0 ; for f in $(FACTORS); do \
        ((i = i + 1)) ; \
        $(f) := $(i) ; \
done

...but without luck: This for-loop is evaluated by the shell and does not 
affect Make variables. 

How can I achieve the desired effect?

/ Christian


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

Reply via email to