[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VPATH & implicit rule searches.
From: |
Paul D. Smith |
Subject: |
Re: VPATH & implicit rule searches. |
Date: |
Tue, 15 Mar 2005 12:57:03 -0500 |
%% Tristan Van Berkom <address@hidden> writes:
tvb> %.d::%.c
tvb> $(mkdep)
>> If the pathnames to the %.d and %.c files are different then this rule
>> cannot work. The stem must be IDENTICAL or the pattern does not match.
tvb> But the rule *does* work, only the VPATH mechanism strips the
tvb> leading pathname in order to make the match (if I understand
tvb> correctly that is).
That's not really what happens, but anyway :-).
tvb> Printing the $@ in the rule yeilds the `file.d' without the path
tvb> anyway.
This means that _technically_ make (or your makefile) is incorrect, just
as I said. It means that make EXPECTS your rule to build file.d (no
pathname). If that's not what your rule really builds, then
_technically_ your rule is behaving incorrectly.
It's possible that in your particular situation, this incorrect behavior
doesn't actually become an issue and the makefile still works as you are
expecting it to.
You might gain some insight by reading some of the docs on my website
below: one is related to VPATH and another to automatic dependency
generation.
--
-------------------------------------------------------------------------------
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