This patch finally allows the majority of tests to succeed in a setup where Automake's absolute source and build tree names contain white space (assuming all other pending patches are applied).
It makes little sense to run the gettext and libtool tests this way: the setting of $ACLOCAL which contains the now-absolute $srcdir will certainly fail. Also, libtool itself cannot cope with spaces in the absolute build tree, at least in most cases. A couple of notes: since defs.in sets `$srcdir' to an absolute value (before unsetting it), I decided to quote it everywhere in defs.in. Actually, since most of the remaining test failures are due to am_aux_dir, they can be worked around with: PATH=$PATH:$source_tree/lib MISSING=missing install_sh=install-sh export PATH MISSING install_sh make -e check Cheers, Ralf * tests/defs.in: Quote $srcdir, $PATH; skip libtool and gettext tests if the absolute source or build tree name contain whitespace. diff --git a/tests/defs.in b/tests/defs.in index 107bfe8..c15c530 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -49,11 +49,11 @@ if test -z "$srcdir"; then VERBOSE=x # compute $srcdir. srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'` - test $srcdir = $0 && srcdir=. + test "$srcdir" = $0 && srcdir=. else :; fi # Ensure $srcdir is set correctly. -test -f $srcdir/defs.in || { +test -f "$srcdir/defs.in" || { echo "$srcdir/defs.in not found, check \$srcdir" 1>&2 exit 1 } @@ -92,7 +92,7 @@ export ACLOCAL_TESTSUITE_FLAGS test -z "$AUTOMAKE" && AUTOMAKE="[EMAIL PROTECTED]@ --foreign -Werror -Wall" PATH="[EMAIL PROTECTED]@$PATH" -echo $PATH +echo "$PATH" # Some shells forget to export modified environment variables. # (See note about `export' in the Autoconf manual.) export PATH @@ -260,7 +260,7 @@ signal=0 # Copy in some files we need. for file in install-sh missing depcomp; do - cp $srcdir/../lib/$file $testSubDir/$file || exit 1 + cp "$srcdir/../lib/$file" "$testSubDir/$file" || exit 1 done cd ./$testSubDir @@ -320,6 +320,12 @@ case $required in *libtool* ) test $libtool_found = yes || exit 77 ;; *gettext* ) test $gettext_found = yes || exit 77 ;; esac + # Libtool cannot cope with spaces in the build tree. Our testsuite setup + # cannot cope with spaces in the source tree name for Libtool and gettext + # tests. + case $srcdir,`pwd` in + *\ * | *\ *) exit 77 ;; + esac ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I $aclocaldir" ;; esac