I'd like to run a command for each file in a list. I feel that the following
SHOULD work, but appearantly I don't understand how foreach works or
something, because nothing is done (the code is paraphrase for clarity).

FILES = file1.asm file2.asm file3.asm
COMPILER = path/to/compiler
FLAGS = -mp -o2 -k -m -i/lib

define FILE_Template
$(COMPILER) $(FLAGS) $(1)
endef

all:
    $(foreach file, $(FILES), $(eval $call( FILE_Template,$(file))))

What's happening here that I'm missing? Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/Execute-command-for-each-file-in-list--tp17981392p17981392.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.



_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to