Skip to content

Commit c74d5ce

Browse files
committed
Stop configure early if git or subconfigures fail.
1 parent b532812 commit c74d5ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

configure

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ err() {
1919
exit 1
2020
}
2121

22+
need_ok() {
23+
if [ $? -ne 0 ]
24+
then
25+
err $1
26+
fi
27+
}
2228

2329
need_cmd() {
2430
if which $1 >/dev/null 2>&1
@@ -441,12 +447,14 @@ if [ $NEED_INIT ]
441447
then
442448
msg "git: submodule init"
443449
"${CFG_GIT}" submodule init --quiet
450+
need_ok "git failed"
444451
fi
445452

446453
if [ $NEED_UPDATE ]
447454
then
448455
msg "git: submodule update"
449456
"${CFG_GIT}" submodule update --quiet
457+
need_ok "git failed"
450458
fi
451459

452460
cd ${CFG_BUILD_DIR}
@@ -534,6 +542,7 @@ do
534542
${CFG_BUILD_DIR}/${CFG_LLVM_SRC_DIR}/configure $LLVM_FLAGS
535543
;;
536544
esac
545+
need_ok "LLVM configure failed"
537546
cd $CFG_BUILD_DIR
538547
else
539548
LLVM_BUILD_DIR=

0 commit comments

Comments
 (0)