[commit: ghc] master, ghc-lwc2, type-nats: Fix autoconf code to find LLVM tools. (cdae665)

Ian Lynagh igloo at earth.li
Thu Feb 28 15:19:59 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branches: master,ghc-lwc2,type-nats

http://hackage.haskell.org/trac/ghc/changeset/cdae6654f2ba1a7d2c5711cd6ba26b0e73f4b1e1

>---------------------------------------------------------------

commit cdae6654f2ba1a7d2c5711cd6ba26b0e73f4b1e1
Author: Geoffrey Mainland <gmainlan at microsoft.com>
Date:   Mon Feb 25 08:06:46 2013 +0000

    Fix autoconf code to find LLVM tools.
    
    The loop exit condition was testing ${LLC} instead of $1, which was
    incorrect. While I'm here, quote the path being tested since it may contain
    spaces (e.g. on Windows), and don't search paths that don't exist, which
    eliminates un-useful error messages from find.

>---------------------------------------------------------------

 aclocal.m4 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index b38418b..11c95ee 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1967,10 +1967,12 @@ AC_DEFUN([FIND_LLVM_PROG],[
         save_IFS=$IFS
         IFS=":;"
         for p in ${PATH}; do
-            $1=`${FindCmd} ${p} -type f -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' -or -type l -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' | ${SortCmd} -n | tail -1`
-            if test -n "${LLC}"; then
-                break
-            fi
+	    if [ -d "${p}" ]; then
+                $1=`${FindCmd} "${p}" -type f -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' -or -type l -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' | ${SortCmd} -n | tail -1`
+                if test -n "$1"; then
+                    break
+                fi
+	    fi
         done
         IFS=$save_IFS
     fi





More information about the ghc-commits mailing list