]> git.lizzy.rs Git - rust.git/commitdiff
configure: Add --disable-manage-submodules switch
authorBrian Anderson <banderson@mozilla.com>
Tue, 29 Nov 2011 01:50:23 +0000 (17:50 -0800)
committerBrian Anderson <banderson@mozilla.com>
Tue, 29 Nov 2011 02:01:42 +0000 (18:01 -0800)
This will keep configure/make from updating submodules, which becomes
very annoying when you are working on LLVM

Makefile.in
configure

index 4a2e40b06aa6dd55c01480ba19c5f9853570987e..b9920aa60ad9b3b5e2e0f095f8d493011b421d5d 100644 (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
index bc904afbeebc3f2e2d40ae535b3fafd74741c770..dc539d0af0cbad503d4d1d42a22a8daa0ece3456 100755 (executable)
--- a/configure
+++ b/configure
@@ -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