automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests/defs.in: Quote $srcdir, $PATH; skip libtool and gettext tests.


From: Ralf Wildenhues
Subject: tests/defs.in: Quote $srcdir, $PATH; skip libtool and gettext tests.
Date: Mon, 26 Nov 2007 23:29:47 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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="address@hidden@ --foreign -Werror -Wall"
 
 PATH="address@hidden@$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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]