help-make
[Top][All Lists]
Advanced

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

Target specific variable settings used in target prerequistes ?


From: Frazer Worley
Subject: Target specific variable settings used in target prerequistes ?
Date: Wed, 14 Mar 2007 08:24:59 -0700 (PDT)


Firstly, apologies for incorrect use of make terms/speak - I'm a hacker ;-)

We're trying use variable settings defined in a target specific rules within the target's prerequisite list. It doesn't appear that
the variables settings are actually valid/applied until the body of the target - the command section.

Here a snippet of code which exhibits the issue:

BLOCK= top

.PHONY: Lint-Reuse

Lint-Reuse: DISCIPLINE=Lint
Lint-Reuse: GOAL=Reuse
Lint-Reuse: MILESTONE=3_Analysis
Lint-Reuse: $(MILESTONE)/$(BLOCK)/$(DISCIPLINE)-$(GOAL)/output

$(MILESTONE)/$(BLOCK)/$(DISCIPLINE)-$(GOAL)/output: $(BLOCK)/rules/$(BLOCK)_$(DISCIPLINE).f
  @echo "do something .."
  $(TOUCH) $@


We'd expect the prerequisite "$(BLOCK)/rules/$(BLOCK)_$(DISCIPLINE).f" to resolve to "top/rules/top_Lint.f" however Make resolves it to "top/rules/top_.f" which doesn't
exist and and thus Make fails.

Any help in getting something like this to work would be much appreciated, if this type of approach can't be used and alternative concise implementation would suit us just as well.

Best Regards,

-Frazer








Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
reply via email to

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