mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Stop configure early if git or subconfigures fail.
This commit is contained in:
parent
b532812572
commit
c74d5ce046
9
configure
vendored
9
configure
vendored
@ -19,6 +19,12 @@ err() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
need_ok() {
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
err $1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
need_cmd() {
|
need_cmd() {
|
||||||
if which $1 >/dev/null 2>&1
|
if which $1 >/dev/null 2>&1
|
||||||
@ -441,12 +447,14 @@ if [ $NEED_INIT ]
|
|||||||
then
|
then
|
||||||
msg "git: submodule init"
|
msg "git: submodule init"
|
||||||
"${CFG_GIT}" submodule init --quiet
|
"${CFG_GIT}" submodule init --quiet
|
||||||
|
need_ok "git failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $NEED_UPDATE ]
|
if [ $NEED_UPDATE ]
|
||||||
then
|
then
|
||||||
msg "git: submodule update"
|
msg "git: submodule update"
|
||||||
"${CFG_GIT}" submodule update --quiet
|
"${CFG_GIT}" submodule update --quiet
|
||||||
|
need_ok "git failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${CFG_BUILD_DIR}
|
cd ${CFG_BUILD_DIR}
|
||||||
@ -534,6 +542,7 @@ do
|
|||||||
${CFG_BUILD_DIR}/${CFG_LLVM_SRC_DIR}/configure $LLVM_FLAGS
|
${CFG_BUILD_DIR}/${CFG_LLVM_SRC_DIR}/configure $LLVM_FLAGS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
need_ok "LLVM configure failed"
|
||||||
cd $CFG_BUILD_DIR
|
cd $CFG_BUILD_DIR
|
||||||
else
|
else
|
||||||
LLVM_BUILD_DIR=
|
LLVM_BUILD_DIR=
|
||||||
|
Loading…
Reference in New Issue
Block a user