On Wed, 2008-06-18 at 15:36 +0200, Sam Ravnborg wrote:
> > 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!
>
> You have some obvious paranthesis bugs.
> But I think the need for double escaping fouls you.
> Please read the chapter on "eval" in info make.
> And consider if you really need to use eval here.
Sam is right; this is one of those cases where, given a hammer (and eval
is a hammer with a particularly slippery grip), everything looks like a
nail.
What's wrong with the tradition, portable, been-in-use-since-the-1970's
method of doing this:
all:
for file in $(FILES); do $(COMPILER) $(FLAGS) $$file || exit 1; done
I mean, besides the fact that is totally wrong given -k and also given
parallelism (-j)?
For that matter, what's wrong with the usual method which works properly
in all situations:
all: $(FILES:.asm=.o)
%.o : %.asm
$(COMPILER) $(FLAGS) $<
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make