From c74d5ce0468054c327fecc1302275c66ed0b8f2c Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 5 Jan 2012 18:59:54 -0800 Subject: [PATCH] Stop configure early if git or subconfigures fail. --- configure | 9 +++++++++ 1 file changed, 9 insertions(+) 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= -- 2.44.0