Hi,

Currently I have the following rule setup (adding wildcard rules to other excisting rules) imported via include which works just fine (thanks to Paul Smith!):

 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.....

--------
But it is preferred not to have any external files.
So I tried to achieve the same with "eval" but somehow the extra rule is not included now.
Below my trial, could someone tell me what the correct syntax should look like?


 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.....



Thanks a lot!!


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

Reply via email to