+2007-12-22 Bruno Haible <bruno@clisp.org>
+
+ * gnulib-tool (func_create_testdir): Change $auxdir while generating
+ the contents of $testsbase.
+ Reported by Ralf Wildenhues.
+
2007-12-22 Bruno Haible <bruno@clisp.org>
* gnulib-tool (func_emit_tests_Makefile_am): Replace local_ldadd with
if test -n "$inctests"; then
test -d "$testdir/$testsbase" || mkdir "$testdir/$testsbase"
+ # Viewed from the $testsbase subdirectory, $auxdir is different.
+ saved_auxdir="$auxdir"
+ auxdir=`echo "$testsbase/"|sed 's%[^/][^/]*//*%../%g'`"$auxdir"
# Create $testsbase/Makefile.am.
use_libtests=false
func_emit_tests_Makefile_am > "$testdir/$testsbase/Makefile.am"
# Create $testsbase/configure.ac.
(echo "# Process this file with autoconf to produce a configure script."
echo "AC_INIT([dummy], [0])"
- echo "AC_CONFIG_AUX_DIR([../$auxdir])"
+ echo "AC_CONFIG_AUX_DIR([$auxdir])"
echo "AM_INIT_AUTOMAKE"
echo
echo "AM_CONFIG_HEADER([config.h])"
sed_replace_build_aux='
:a
/AC_CONFIG_FILES(.*:build-aux\/.*)/{
- s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:../'"$auxdir"'/\2)|
+ s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
ba
}'
func_emit_initmacro_start $macro_prefix
echo
echo "AC_OUTPUT([Makefile])"
) > "$testdir/$testsbase/configure.ac"
+ auxdir="$saved_auxdir"
func_append subdirs " $testsbase"
subdirs_with_configure_ac="$subdirs_with_configure_ac $testsbase"
fi