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.
This commit is contained in:
Stepan Kasal 2008-05-13 13:40:55 -06:00 committed by Eric Blake
parent 4bd87562dc
commit 809b3e5353
2 changed files with 16 additions and 8 deletions

View File

@ -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.

View 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