"Paul D. Smith" wrote: > > %% Russell <[EMAIL PROTECTED]> writes: > > >> CSRCS = file1.c file2.c file999.c file1000.c > >> c.pfs: > >> @rm -f $@ > >> @$(foreach f,$(CSRCS),$(shell echo $(f) >> $@)) > > r> I think each line of the command is spawned as a separate > r> shell process. Try to keep all the commands in one line > r> (one process): > > He's using make commands like $(foreach ...) and $(shell ...), and those > are evaluated by make before the command script is actually invoked. > > So, what you're suggesting won't help...
But wouldn't the line: @$(foreach f,$(CSRCS),$(shell echo $(f) >> $@)) end up as a series of shell commands? I thought it would then be more logical to execute all the shell commands beginning from the start: @rm -f $@ ; \ $(foreach f,$(CSRCS),$(shell echo $(f) >> $@)) Is this quirk of execution order stated in the manual? I'd consider it a bug fix if that quirk wasn't so. _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
