RE: Scripting inside Makefile

2004-08-05 Thread Hyams Iftach
Title: RE: Scripting inside Makefile >> This makes every file in LIST1 and LIST2 dependent on every >> file in LIST. Thus, make will regenerate fooCDU_1baz.c >> whenever barCDUbaz.c is touched. I think... True, but I don't care. Usually the original are not mo

Re: Scripting inside Makefile

2004-08-03 Thread Tzafrir Cohen
On Tue, Aug 03, 2004 at 05:10:26PM +, Oleg Goldshmidt wrote: > Tzafrir Cohen <[EMAIL PROTECTED]> writes: > > > $(LIST2): $(LIST) > > $(COMMAND) > > > > $(LIST1): $(LIST) > > $(COMMAND) > > This makes every file in LIST1 and LIST2 dependent on every file in > LIST. Thus, make will reg

Re: Scripting inside Makefile

2004-08-03 Thread Oleg Goldshmidt
Tzafrir Cohen <[EMAIL PROTECTED]> writes: > $(LIST2): $(LIST) > $(COMMAND) > > $(LIST1): $(LIST) > $(COMMAND) This makes every file in LIST1 and LIST2 dependent on every file in LIST. Thus, make will regenerate fooCDU_1baz.c whenever barCDUbaz.c is touched. I think... -- Oleg Golds

Re: Scripting inside Makefile

2004-08-03 Thread Tzafrir Cohen
On Tue, Aug 03, 2004 at 12:31:14PM +0200, Hyams Iftach wrote: > The formed solution: > > LIST = $(wildcard *CDU*) > LIST1 = $(subst CDU,CDU_1,$(LIST)) > LIST2 = $(subst CDU,CDU_2,$(LIST)) > > all: $(LIST1) $(LIST2) > > $(LIST1): $(LIST) > sed -e "s/CDU/CDU_1/g" $(subst CDU_1,CDU,$@) >

RE: Scripting inside Makefile

2004-08-03 Thread Hyams Iftach
Title: RE: Scripting inside Makefile The formed solution: LIST   = $(wildcard *CDU*) LIST1  = $(subst CDU,CDU_1,$(LIST)) LIST2  = $(subst CDU,CDU_2,$(LIST)) all: $(LIST1) $(LIST2) $(LIST1): $(LIST)     sed -e "s/CDU/CDU_1/g" $(subst CDU_1,CDU,$@) > $@ $(LIST2): $(LIST

Re: Scripting inside Makefile

2004-08-02 Thread Tzafrir Cohen
On Mon, Aug 02, 2004 at 05:10:17PM +0200, Hyams Iftach wrote: > I need a portable script that can be automatically executed during build > (old system - make 3.74). > Suppose I can't make others to upgrade their utilities (shell, sed, make > ..) so no new features are allowed. What about perl -pi

Scripting inside Makefile

2004-08-02 Thread Hyams Iftach
Title: Scripting inside Makefile  I need a portable script that can be automatically executed during build (old system - make 3.74). Suppose I can't make others to upgrade their utilities (shell, sed, make ...) so no new features are allowed.  The source is a directory with many files