[PATCH] Have to configure and build inside the source directory.

Carl Worth cworth at cworth.org
Wed Mar 9 15:19:53 PST 2011


On Fri, 28 Jan 2011 17:18:16 -0600, Rob Browning <rlb at defaultvalue.org> wrote:
> I think the use of GNU make VPATH is fairly common.  For example, I
> believe the autotools build a tree that matches the srcdir structure and
> add Makefiles that contain something like this:
> 
>   VPATH = ../../wherever/notmuch/thisdir
>   ...
> 
> Of course, given that, the build tree doesn't include any source
> files.

Thanks for the pointer to VPATH. I had some code half-written to use
this sitting around since we last talked about it, and I've just cleaned
it up and pushed it out now.

It turns out that VPATH itself isn't very useful, (since it matches on
targets as well as prerequisites), but the similar "vpath" directive
matches only on prerequisites so it does what we want here.

So non-source-directory builds of notmuch should work now. Along the
lines of:

	git clone git.notmuchmail.org:/git/notmuch
        cd notmuch      
	mkdir build
        cd build
        ../configure
        make

Everyone, please feel free to test this and report back if you see any
problems.

We should also fix the "make release" target to exercise this code. Does
anyone know what else a GNU configure script typically does in "make
distcheck". I recall that it untars the built tar file and does a
non-srcdir build of it, (and runs the test suite). Then I think it also
does an install and perhaps checks that no extra files are leftover
after "make clean"? Something like that anyway---and we should probably
do something similar.

-Carl

-- 
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110309/d372cefc/attachment.pgp>


More information about the notmuch mailing list