build: Build tests in a separate directory
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Wed, 11 Mar 2009 06:09:44 +0000 (02:09 -0400)
committerJon Masters <jcm@jonmasters.org>
Wed, 11 Mar 2009 06:09:44 +0000 (02:09 -0400)
commitc1abab8a8c4d5e1c4ba24a7e90f00f365ebc0239
tree7a90f8d4856d9b7ff67df50c33d9b9e3d3e46f0d
parentd1806865556897e1994edf5f841139ce7c624ef0
build: Build tests in a separate directory

Use tests/build for the -DJUST_TESTING versions of modprobe and friends.
That way we can run the tests without screwing up the normal build
directory.

This requires that the normal build directory be kept separate from
the source directory.  The default build directory is now "build".
This dirty work is done by a heavily fixed-up version of
AC_ENABLE_BUILDDIR from the autoconf macro archive.

The macro creates a toplevel Makefile, which should handle the
requirements of most users without requiring them to enter the build
directory.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
---
Changes since version 2:

1. Move autoconf extensions to m4 directory, as suggested by Mike
   Frysinger.

2. Remove sinclude from configure.ac. sinclude is an obsolete alias for
   m4_include. aclocal generates m4_include's automatically.

3. Make it clear that ax_enable_builddir.m4 has been modified, i.e. it
   is out of sync with the autoconf archive.  I've sent the patches
   to the maintainer now, so hopefully this is a temporary situation.
.gitignore
Makefile.am
configure.ac
m4/ax_configure_args.m4 [new file with mode: 0644]
m4/ax_enable_builddir.m4 [new file with mode: 0644]
tests/runtests
tests/test-insmod/03options.sh