]> git.lizzy.rs Git - rust.git/commitdiff
Stop configure early if git or subconfigures fail.
authorGraydon Hoare <graydon@mozilla.com>
Fri, 6 Jan 2012 02:59:54 +0000 (18:59 -0800)
committerGraydon Hoare <graydon@mozilla.com>
Fri, 6 Jan 2012 03:00:37 +0000 (19:00 -0800)
configure

index 927fc62c4af732a735bd85e397cd042e2e5bd2dd..cf5ae5f1651f49363e38ec0c4371bb8d69e21ebd 100755 (executable)
--- a/configure
+++ b/configure
@@ -19,6 +19,12 @@ err() {
     exit 1
 }
 
+need_ok() {
+    if [ $? -ne 0 ]
+    then
+        err $1
+    fi
+}
 
 need_cmd() {
     if which $1 >/dev/null 2>&1
@@ -441,12 +447,14 @@ if [ $NEED_INIT ]
 then
     msg "git: submodule init"
     "${CFG_GIT}" submodule init --quiet
+    need_ok "git failed"
 fi
 
 if [ $NEED_UPDATE ]
 then
     msg "git: submodule update"
     "${CFG_GIT}" submodule update --quiet
+    need_ok "git failed"
 fi
 
 cd ${CFG_BUILD_DIR}
@@ -534,6 +542,7 @@ do
                ${CFG_BUILD_DIR}/${CFG_LLVM_SRC_DIR}/configure $LLVM_FLAGS
                ;;
        esac
+    need_ok "LLVM configure failed"
        cd $CFG_BUILD_DIR
     else
        LLVM_BUILD_DIR=