bug-make
[Top][All Lists]
Advanced

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

Re: Inconsistent VPATH behavior ..


From: Harsha Kalidindi
Subject: Re: Inconsistent VPATH behavior ..
Date: Mon, 24 Feb 2003 13:10:11 -0500

Paul:

VPATH is useful only to find source files from the destination
directory, it cannot be used to find destination files from the source
directory.

I think that's what your trying to do here: run make in the source
directory and put the results in a different directory.  VPATH cannot be
used in that environment.

You might take a look at my web site below: there's an in-depth
discussion of how VPATH works (and doesn't).

We are setting VPATH to only look for source files but gmake is attaching the target directory (which is a relative path) to the VPATH and satisfies itself as to the fulfillment of the target. I think the only way I can clearly explain this is by giving you the scenario I sent you before:

        /user/p/src has the makefile and sources.
        /user/p/install has the install tree.


        /user/u/src has the makefile and sources.
        /user/u/install has the install tree.


The GNUmakefile in the src tree has VPATH set to /user/p/src to only look for sources.

        ../install/scripts/% : %
                $(INSTALL) -m 444 $(<) $(@)

        is the rule.


If the install tree in /user/u/install has not yet been created (that is the rule has not been run even once). gmake -d shows that it actually looks at $(VPATH)/../install/scripts and compares the dates with /user/u/src. If /user/u/install does exist then it first compares the dates between them and /user/u/src.

gmake is looking in $(VPATH)/../install/scripts. We are not expecting it to. We expect it to look in VPATH only for sources when they don't exist in the current source tree ..


Regards,
Harsha

address@hidden 212.762.4165

This communication is intended for the addressee(s) and may contain confidential and legally privileged information. We do not waive confidentiality or privilege by mis-transmission. If you have received this communication in error, any use, dissemination, printing or copying is strictly prohibited; please destroy all electronic and paper copies and notify the sender immediately.





reply via email to

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