From: Graydon Hoare Date: Fri, 6 Jan 2012 02:59:54 +0000 (-0800) Subject: Stop configure early if git or subconfigures fail. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c74d5ce0468054c327fecc1302275c66ed0b8f2c;p=rust.git Stop configure early if git or subconfigures fail. --- diff --git a/configure b/configure index 927fc62c4af..cf5ae5f1651 100755 --- 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=