Hi,
When experimenting with some input variables I found the following strange behaviour:
I have an external module.hier file listing modules to be processed.
I use the following lines in the generic makefile:
MODULES = $(shell cat module.hier | $(GREP) ) #determine list of modules
TOP_MOD = $(word $(words $(MODULES)),$(MODULES) ) #determine last module from list
.add_rules.mk : makefile \
module.hier
@rm -f $@;\
for t in $(MODULES); do \
print "$$t/ddb/generic.db : \\" >>$@;\
print " \$$(wildcard $$t/../RTL/*.vhdl)" >>$@;\
done;\
print "proj/$$t/synopsys/ddb/scanopt.db : \\" >>$@;\
print " \$$(wildcard proj/$$t/../NETLIST/*_netlist_scn.v)" >>$@;\
print "proj/$(TOP_MOD)/synopsys/ddb/scanopt.db : \\" >>$@;\
print " \$$(wildcard proj/$(TOP_MOD)/../NETLIST/*_netlist_scn.v)" >>$@;
-include .add_rules.mk
------------------------------------------------------------------
What I get as a result (only 'module1' in module.hier) is:
module1/ddb/generic.db : \
$(wildcard module1/cmd/*specific.tcl) \
$(wildcard module1/../RTL/*.vhdl)
proj/module1/synopsys/ddb/scanopt.db : \
$(wildcard proj/module1/../NETLIST/*_netlist_scn.v)
proj/module1 /synopsys/ddb/scanopt.db : \
$(wildcard proj/module1 /../NETLIST/*_netlist_scn.v)
____________________________________________________
Could somebody explain to me why in the last two lines there are spaces after the module1 name??
When I do an echo of $(TOP_MOD) I do not see these spaces!
I would expect the last two proj/... lines to be the same.
Thanks!
Hans Peter.
_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
