I'm trying to create an output file that
has one filename per line.  (I need to feed
the filenames to the shell one at a time to
avoid win32 command-line length issues when
dealing with hundreds/thousands of files)

The makefile below doesn't work because the
foreach is evaluated *before* the rm command is
executed.  The result is that the "shell echo"
commands run first to create "c.pfs" and then
the rm deletes it every time.

Any ideas on a better way to get the rules to
run in the desired order?

--------------------------------------------- 
CSRCS = file1.c file2.c file999.c file1000.c
c.pfs:
        @rm -f $@
        @$(foreach f,$(CSRCS),$(shell echo $(f) >> $@))
--------------------------------------------- 

regards,
markt


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to