From ba43f7bc8c81e595182abdf1698f0a19187c11b5 Mon Sep 17 00:00:00 2001 From: Stuart Pernsteiner Date: Tue, 9 Sep 2014 11:24:17 -0700 Subject: [PATCH] ignore uninitialized submodules when checking if ./configure should be re-run --- mk/reconfig.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mk/reconfig.mk b/mk/reconfig.mk index 8b88fee0ad3d9..fc8237d32bb3e 100644 --- a/mk/reconfig.mk +++ b/mk/reconfig.mk @@ -15,7 +15,11 @@ rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \ 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 '^\(+\|-\)') +# NB: This only looks for '+' status (wrong commit checked out), not '-' status +# (nothing checked out at all). `./configure --{llvm,jemalloc,libuv}-root` +# will explicitly deinitialize the corresponding submodules, and we don't +# want to force constant rebuilds in that case. +NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+') else NEED_GIT_RECONFIG=0 endif