hpvl> MODULES = Mod1 Mod2.....
 hpvl> MOD_PATH = $(foreach OBJ,$(MODULES),../../$(OBJ)/synopsys)
 hpvl> define ADD_rules
 hpvl>       $(1)/ddb/generic.db : $(1)/$(wildcard /cmd/*specific.tcl )
 hpvl> endef

pds> I'm confused here.  Why do you have just '/cmd/*...', when in the
pds> original one you used '$$t/cmd/...'?

Yeah, I tried in my ignorance to move the path variable before the wildcard statement.
I know now this the way to do this is via a addsuffix...

 pds> I recommend using $(warning ...) as a debugging tool.  Replace the call
 pds> to eval with a call to warning and you'll see exactly what is being
 pds> evaluated.  That can help you understand what is going on:

 pds>    $(foreach mod,$(MOD_PATH),$(warning $(call ADD_rules,$(mod))))

Thanks Pauls this was a really usefull tip! Now I could see what went wrong!

the correct line should be:

define ADD_rules
  $(addsuffix /ddb/generic.db,$(1)) : $(wildcard $(addsuffix /cmd/*specific.tcl,$(1)) )
endef

But I see some strange behaviour:
I also have a rule like:
$(addsuffix /ddb/generic.db,$(1)) : $(wildcard $(addsuffix /../RTL/*.vhdl,$(1)) )
                                                           ^^^
With the warning in stead of eval as suggested, this shows me the correct listing of vhdl files.
But when I put eval in I get the message:

   run[8]: 18298 Memory fault(coredump)

When I put the RTL dir one level lower and change the rule to:
$(addsuffix /ddb/generic.db,$(1)) : $(wildcard $(addsuffix /RTL/*.vhdl,$(1)) )

It does work fine!
Any suggestion what might be wrong? Could this be a bug of eval?

Thanks,

Hans Peter.

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

Reply via email to