Re: using VPATH with ./configure and make

Guido.van.Rossum@cwi.nl
Fri, 11 Feb 1994 23:31:16 +0100

> Has anyone else used VPATH with configure and make to
> be able to have a single source and multiple platform excutables?
>
> Can someone send me an example of the steps needed?
> I have never used VPATH before...

Well, PROVIDED that your Make program supports VPATH, it's very
simple. If it doesn't, you simply can't (and you could use a forest
of symbolic links instead -- see the mkreal script from the
Demo/scripts directory).

What I do is simply this (I build in a subdirectory of /usr/tmp for
sentimental reasons :-):

cd /usr/tmp
mkdir python
cd python
~guido/src/python/configure
.
. (several minutes pass)
.
make

This of course presumes that ~guido/src/python is the top directory of
the Python source tree. If you want to use readline it's a bit more
tricky, since the configure script doesn't patch its Makefile.

One thing to remember about VPATH is that generally Make does not do
variable substitution on VPATH; this this is alright:

srcdir = /ufs/guido/src/python/Python
VPATH = /ufs/guido/src/python/Python

and this fails:

srcdir = /ufs/guido/src/python/Python
VPATH = $(srcdir)

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>