help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: foreach/ordering help


From: Paul D. Smith
Subject: Re: foreach/ordering help
Date: Sat, 2 Nov 2002 20:40:19 -0500

%% Mark Therieau <address@hidden> writes:

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

Do the rm in a $(shell ...) as well:

  c.pfs:
        @$(shell rm -f $@); \
         $(foreach f,$(CSRCS),$(shell echo $(f) >> $@))

This is going to be slow, though...

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]