[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconsistent VPATH behavior ..
From: |
Paul D. Smith |
Subject: |
Re: Inconsistent VPATH behavior .. |
Date: |
Mon, 10 Mar 2003 17:39:34 -0500 |
%% Harsha Kalidindi <address@hidden> writes:
>> GNU make works exactly as I've described above: first it looks for the
>> pathname exactly as it is given in the makefile.
hk> Breakthrough. No more failure to communicate. This is the nub of
hk> the issue ..
>> If that doesn't exist, _then_ it appends the pathname that is given in
>> the makefile onto each entry in VPATH, in order, and looks for that.
hk> VPATH=/u/p/src
hk> install: ../install/scripts/foo
hk> $(INSTALL) ..
hk> Command run in '/u/user/src'. If
hk> /u/user/src/../install/scripts/foo does not exist, I would expect
hk> it to run the command instead of looking into
hk> /u/p/src/../install/scripts/foo ..
Well, that's actually the entire purpose of VPATH: to tell make where
else to look if it can't find the prerequisite by the pathname that the
makefile provides. If you don't want that behavior then you will have
to stop using VPATH. Presumably there's some other reason you need it,
and the above is just an unwanted side-effect?
The other option is to use the "vpath <pattern>" form to restrict the
VPATH lookup to only a subset of all the prerequisites in the makefile.
--
-------------------------------------------------------------------------------
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