]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Work around MSYS and Cygwin bugs when dealing with trailing space.
authorStepan Kasal <kasal@ucw.cz>
Tue, 13 May 2008 19:40:55 +0000 (13:40 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 13 May 2008 19:40:55 +0000 (13:40 -0600)
* tests/atlocal.in (func_sanitize_dir_name): Let atlocal succeed,
even when platform bugs are tickled.
Reported by Keith Marshall and Eric Blake.

ChangeLog
tests/atlocal.in

index 5af9cd029633fb6d6317daa675206596b72f29a9..dc02724156138c44d0f285bfb9fe3bd537667439 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-13  Stepan Kasal  <kasal@ucw.cz>
+
+       Work around MSYS and Cygwin bugs when dealing with trailing space.
+       * tests/atlocal.in (func_sanitize_dir_name): Let atlocal succeed,
+       even when platform bugs are tickled.
+       Reported by Keith Marshall and Eric Blake.
+
 2008-05-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Let AC_MSG_FAILURE report pwd.
index baef9868a28c8c876f26650ad7aec1db4b2b307b..ad72c374f9db367114581a673a92596ea4704d00 100644 (file)
@@ -44,11 +44,12 @@ else
 fi
 
 # Can we create directories with trailing whitespaces in their name?
-rm -rf 'tdir /'
-mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null
-if test -f 'tdir /tfile'; then
-  func_sanitize_dir_name () { echo "$@"; }
-else
-  func_sanitize_dir_name () { echo "$@" | sed 's/  *$//'; }
-fi
-rm -rf 'tdir /'
+rm -rf 'tdir ' && mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null
+a=$?
+rm -rf 'tdir '
+case $a$? in #(
+00)
+  func_sanitize_dir_name () { echo "$@"; } ;; #(
+*)
+  func_sanitize_dir_name () { echo "$@" | sed 's/  *$//'; } ;;
+esac