[m-dev.] for review: make vpath_find look for .exe files.

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jun 11 10:24:49 AEST 1999


On 11-Jun-1999, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > 
> > I'm not sure that changing vpath_find is the best approach.
> > VPATH, and hence vpath_find, is supposed to be used for finding
> > source files, not for finding executables.
> 
> If this is true, then the install scripts are simply misusing vpath_find
> to find executables.  I can change them so they don't -- there's no
> real need to use vpath_find in the installation is there?

Well... actually there's no need to use vpath_find at all.

The original idea with all that vpath_find stuff was to support
`configure --srcdir=blah', which lets you build things in a different
directory, by setting VPATH to point to the source directory. 
This is a standard feature of autoconf; the purpose is to let you
build the system for more than one architecture with only one
copy of the source code.

Another additional rationale for the vpath_find stuff was the aim
of letting you build the compiler in one directory, and then in
a different directory have only the source files which you have changed;
you should be able to build the system and have make only create
object files for modules that need to be recompiled; for modules
that don't need to be recompiled, it should use the object files
in the original directory.  This was particularly desirable given
the high disk usage of the current scheme using cvs where everyone
checks out all the sources and builds all the objects.

For the first aim, you would only need to use vpath_find on files that
are included in the source distribution.  For the second aim, it does
make sense to use vpath_find on object files and perhaps even executables.

Unfortunately getting either of those two to actually work turned out
to be infeasibly difficult.  A few years ago I spend a couple of days
working on it, and eventually gave up.  (I don't remember exactly
what the problems were, but I do remember that after about two days
I seemed no closer to solving them than when I started.)
I left the existing calls to vpath_find in there just in case they
should turn out to be useful if we were to ever revisit that issue.

My point really is just that I don't think vpath_find is the right
place to handle OS dependencies like .EXE suffixes, because there
is no guarantee that vpath_find will be used for all executables.
vpath_find is a simple script that has a single job to do and
does it well; I don't think we should overload it with code for
other purposes.

Cheers,
	Fergus.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list