From: Simon Marlow Date: Thu, 9 Jul 2009 13:28:50 +0000 (+0000) Subject: workaround new Cygwin bash CRLF behaviour X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=e55e7e8b6aae471d56cc7c77906d62d7ba07a2c1 workaround new Cygwin bash CRLF behaviour --- diff --git a/configure.ac b/configure.ac index 2d8fbe1..f393ded 100644 --- a/configure.ac +++ b/configure.ac @@ -193,7 +193,7 @@ if test "$build" = "" then if test "${WithGhc}" != "" then - build=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//'` + build=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` echo "Build platform inferred as: $build" else echo "Can't work out build platform" @@ -205,7 +205,7 @@ if test "$host" = "" then if test "${WithGhc}" != "" then - host=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//'` + host=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` echo "Host platform inferred as: $host" else echo "Can't work out host platform" @@ -217,7 +217,7 @@ if test "$target" = "" then if test "${WithGhc}" != "" then - target=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//'` + target=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` echo "Target platform inferred as: $target" else echo "Can't work out target platform" @@ -274,7 +274,7 @@ checkOS() { linux|freebsd|netbsd|openbsd|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix) ;; *) - echo "Unknown OS $1" + echo "Unknown OS '$1'" exit 1 ;; esac