[sac-dev] Patch to make our build system support VPATH builds

George Helffrich george at gly.bris.ac.uk
Wed Oct 1 12:50:25 PDT 2008


Dear Kuang -

	VPATH is notoriously nonstandard among BSD, GNU and Sun make.  Suggest 
that you validate its functioning on all those systems.  If 
problematic, it might be too much hassle to make work right, despite 
being potentially attractive for simplifying maintenance.

On 1 Oct 2008, at 20:21, Kuang He wrote:

> Hi, all
>
> VPATH builds [1] are preferred by some people for the following 
> reasons:
>
>    1. They prevent the build process form cluttering your source
> directory with all sorts of build files.
>    2. To remove a build, all you have to do is remove the build 
> directory.
>    3. You can build the same source multiple times using different
> options. This is very useful if you would like to write a script that
> will run the test suite for a package while the package is configured
> in many different ways (e.g. different features, different compiler
> optimization, and so on). It is also useful if you would like to do
> the same with releasing binary distributions of the source.
>
> Well, I think this is very desirable, since with VPATH, we can test
> building from SAC's source code using different parameters, e.g.
> --enable-debug, --enable-readline, --disable-editline
> --disable-readline.
>
> I made some effort to make this happen, and the patch is attached. It
> is not a big patch anyways. I tested using a few different
> combinations of parameters during the ./configure stage, and also in
> different directories (e.g. the subdirectory of the source tree, the
> parent directory of the source tree, a completely different and deep
> directory elsewhere). Everything works OK for me.
>
> [1] http://autotoolset.sourceforge.net/tutorial.html#SEC8
>
>     Explanation of what a `VPATH build' is:
>
>     In a VPATH build, the source distribution is stored in a, possibly
>     read-only, directory, and the actual building takes place in a
>     different directory where all the generated files are being
>     stored. We call the first directory, the source tree, and the
>     second directory the build tree. The build tree may be a
>     subdirectory of the source tree, but it is better if it is a
>     completely separate directory.
>
>
> Best regards,
>
> -- 
> Kuang He
> Department of Physics
> University of Connecticut
> Storrs, CT 06269-3046
>
> Tel: +1.860.486.4919
> Web: http://www.phys.uconn.edu/~he/
> <vpath-patch.diff>_______________________________________________
> sac-dev mailing list
> sac-dev at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/sac-dev
>
                                     George Helffrich
                                     george at geology.bristol.ac.uk



More information about the sac-dev mailing list