help-make
[Top][All Lists]
Advanced

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

Re: some vpath help


From: Paul D. Smith
Subject: Re: some vpath help
Date: Thu, 4 May 2006 14:35:19 -0400

%% "PATTON, BILLY \(SBCSI\)" <address@hidden> writes:

  pb> $(PRD_TREE)/ldb/celltools/bin/%.tix : \
  pb>   vpath $(PRD_TREE)/ldb/celltools/bin/%.tix \
  pb>   $(SRC_TREE)/ldb/celltools/pub

  pb> What is wrong?

I don't think you read the replies you got.  The ones where people told
you that you couldn't put variable settings and prerequisites on the
same line.

Just think, for a second, about how this looks to make after make gets
done with the backslash/newline removal:

  > $(PRD_TREE)/ldb/celltools/bin/%.tix : vpath 
$(PRD_TREE)/ldb/celltools/bin/%.tix $(SRC_TREE)/ldb/celltools/pub

How in the world is make supposed to interpret THAT and get what you
intended?


Second, "vpath $(PRD_TREE)/ldb/celltools/bin/%.tix" is NOT a variable
setting, so you can't use it as a target-specific variable.

And finally, setting VPATH as a target-specific variable won't work: as
discussed in the manual target-specific variables are ONLY operative
inside the command script.  Obviously by the time make gets around to
running a command script it's already long since found the target and
prerequisites and chosen a rule.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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