+2005-08-24 Bruno Haible <bruno@clisp.org>
+
+ * gnulib-tool: Add support for the --aux-dir option to
+ --create-testdir, --create-megatestdir, --test, --megatest.
+ (func_create_testdir, func_create_megatestdir): Optionally emit a
+ AC_CONFIG_AUX_DIR directive.
+ (create-testdir, create-megatestdir, test, megatest): Provide a
+ default value for $auxdir.
+
2005-08-24 Bruno Haible <bruno@clisp.org>
* gnulib-tool (import): Use compound statement instead of subshell
progname=$0
package=gnulib
-cvsdatestamp='$Date: 2005-08-25 12:02:37 $'
+cvsdatestamp='$Date: 2005-08-25 12:08:21 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
--m4-base=DIRECTORY Directory relative --dir where *.m4 macros are
placed (default \"m4\"), for --import.
--aux-dir=DIRECTORY Directory relative --dir where auxiliary build
- tools are placed (default \"build-aux\"),
- for --import.
+ tools are placed (default \"build-aux\").
--avoid=MODULE Avoid including the given MODULE. Useful if you
have code that provides equivalent functionality.
This option can be repeated.
# - libname library name
# - sourcebase directory relative to destdir where to place source code
# - m4base directory relative to destdir where to place *.m4 macros
+# - auxdir directory relative to destdir where to place build aux files
# - avoidlist list of modules to avoid, from --avoid
# - lgpl true if library's license shall be LGPL, blank otherwise
# - libtool true if libtool will be used, blank otherwise
}
# func_create_testdir testdir modules
+# Input:
+# - auxdir directory relative to destdir where to place build aux files
func_create_testdir ()
{
testdir="$1"
# Create configure.ac.
(echo "# Process this file with autoconf to produce a configure script."
echo "AC_INIT([dummy], [0])"
+ if test "$auxdir" != "."; then
+ echo "AC_CONFIG_AUX_DIR([$auxdir])"
+ fi
echo "AM_INIT_AUTOMAKE"
echo
echo "AM_CONFIG_HEADER([config.h])"
}
# func_create_megatestdir megatestdir allmodules
+# Input:
+# - auxdir directory relative to destdir where to place build aux files
func_create_megatestdir ()
{
megatestdir="$1"
# Create configure.ac.
(echo "# Process this file with autoconf to produce a configure script."
echo "AC_INIT([dummy], [0])"
+ if test "$auxdir" != "."; then
+ echo "AC_CONFIG_AUX_DIR([$auxdir])"
+ fi
echo "AM_INIT_AUTOMAKE"
echo
echo "AC_PROG_MAKE_SET"
mkdir "$destdir"
test -d "$destdir" \
|| func_fatal_error "could not create destination directory"
+ test -n "$auxdir" || auxdir="build-aux"
func_create_testdir "$destdir" "$*"
;;
func_fatal_error "please specify --dir option"
fi
mkdir "$destdir" || func_fatal_error "could not create destination directory"
+ test -n "$auxdir" || auxdir="build-aux"
func_create_megatestdir "$destdir" "$*"
;;
test )
test -n "$destdir" || destdir=testdir$$
mkdir "$destdir" || func_fatal_error "could not create destination directory"
+ test -n "$auxdir" || auxdir="build-aux"
func_create_testdir "$destdir" "$*"
cd "$destdir"
mkdir build
megatest )
test -n "$destdir" || destdir=testdir$$
mkdir "$destdir" || func_fatal_error "could not create destination directory"
+ test -n "$auxdir" || auxdir="build-aux"
func_create_megatestdir "$destdir" "$*"
cd "$destdir"
mkdir build