help-make
[Top][All Lists]
Advanced

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

problerm using eval


From: hans . peter . van . lohuizen
Subject: problerm using eval
Date: Tue, 25 Nov 2003 15:55:51 +0100



Any hints for my earlier posted question as put below?
I tried to rewrite my make script with an eval statement to prevent include commands
since our environment prefers not to have additional files.
But somehow the extra rule is not included now.
Below my trial, what could be wrong? I like to learn from this.

(below my original setup with include)

===================
new setup with eval:
===================
 MODULES = Mod1 Mod2.....
MOD_PATH = $(foreach OBJ,$(MODULES),../../$(OBJ)/synopsys)
define ADD_rules
      $(1)/ddb/generic.db : $(1)/$(wildcard /cmd/*specific.tcl )

endef


$(foreach mod,$(MOD_PATH),$(eval $(call ADD_rules,$(mod)) ) )


%ddb/generic.db : %cmd/dc_setup.tcl \

                                     %cmd/generic.tcl

       commands.....


===================

Original setup with include:
===================
MODULES = Mod1 Mod2.....
MOD_PATH = $(foreach OBJ,$(MODULES),../../$(OBJ)/synopsys)

.generated.mk : makefile

       @rm -rf $@

       @for t in $(MOD_PATH); do \

               print "$$t/ddb/generic.db : \\"                                   >>$@;\

               print "       \$$(wildcard $$t/cmd/*specific.tcl) \\"  >>$@;\

       done


include .generated.mk


%ddb/generic.db : %cmd/dc_setup.tcl \

                                     %cmd/generic.tcl

       commands.....





Thanks a lot!!



Hans Peter.
_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make


reply via email to

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