configure: Add --disable-manage-submodules switch

This will keep configure/make from updating submodules, which becomes
very annoying when you are working on LLVM
This commit is contained in:
Brian Anderson 2011-11-28 17:50:23 -08:00
parent cd91c6d065
commit 8d7863fad0
2 changed files with 11 additions and 0 deletions

View File

@ -340,8 +340,12 @@ endif
# Re-configuration
######################################################################
ifndef CFG_DISABLE_MANAGE_SUBMODULES
# This is a pretty expensive operation but I don't see any way to avoid it
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^\(+\|-\)')
else
NEED_GIT_RECONFIG=0
endif
ifeq ($(NEED_GIT_RECONFIG),0)
else

7
configure vendored
View File

@ -253,6 +253,7 @@ opt docs 1 "build documentation"
opt optimize 1 "build optimized rust code"
opt optimize-cxx 1 "build optimized C++ code"
opt optimize-llvm 1 "build optimized LLVM"
opt manage-submodules 1 "let the build manage the git submodules"
opt mingw-cross 0 "cross-compile for win32 using mingw"
opt clang 0 "prefer gcc to clang for building the runtime"
valopt prefix "/usr/local" "set installation prefix"
@ -404,11 +405,17 @@ step_msg "configuring submodules"
# Have to be in the top of src directory for this
cd ${CFG_SRC_DIR}
if [ -z $CFG_DISABLE_MANAGE_SUBMODULES ]
then
SUBMODULE_STATUS=$("${CFG_GIT}" submodule status)
NEED_INIT_COUNT=$(echo "$SUBMODULE_STATUS" | grep -c "^-")
NEED_UPDATE_COUNT=$(echo "$SUBMODULE_STATUS" | grep -c "^+")
NEED_INIT=$(test $NEED_INIT_COUNT -gt 0)$?
NEED_UPDATE=$(test "($NEED_INIT)" -o "$NEED_UPDATE_COUNT" -gt 0)$?
else
NEED_INIT=
NEED_UPDATE=
fi
if [ $NEED_INIT ]
then