This patch makes --aux-dir work for the other modes than --import. * 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.
*** gnulib-tool.bak 2005-08-25 01:22:21.000000000 +0200 --- gnulib-tool 2005-08-25 01:37:21.000000000 +0200 *************** *** 89,96 **** --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. --avoid=MODULE Avoid including the given MODULE. Useful if you have code that provides equivalent functionality. This option can be repeated. --- 89,95 ---- --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\"). --avoid=MODULE Avoid including the given MODULE. Useful if you have code that provides equivalent functionality. This option can be repeated. *************** *** 591,596 **** --- 590,596 ---- # - 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 *************** *** 752,757 **** --- 752,759 ---- } # func_create_testdir testdir modules + # Input: + # - auxdir directory relative to destdir where to place build aux files func_create_testdir () { testdir="$1" *************** *** 832,837 **** --- 834,842 ---- # 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])" *************** *** 883,888 **** --- 888,895 ---- } # func_create_megatestdir megatestdir allmodules + # Input: + # - auxdir directory relative to destdir where to place build aux files func_create_megatestdir () { megatestdir="$1" *************** *** 914,919 **** --- 921,929 ---- # 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" *************** *** 1028,1033 **** --- 1038,1044 ---- mkdir "$destdir" test -d "$destdir" \ || func_fatal_error "could not create destination directory" + test -n "$auxdir" || auxdir="build-aux" func_create_testdir "$destdir" "$*" ;; *************** *** 1036,1047 **** --- 1047,1060 ---- 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 *************** *** 1064,1069 **** --- 1077,1083 ---- 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 _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib