Reconfigure when the git submodule status changes
This commit is contained in:
parent
f96f1692ef
commit
0e150116f3
11
Makefile.in
11
Makefile.in
|
@ -318,6 +318,17 @@ endif
|
||||||
# Re-configuration
|
# Re-configuration
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
# This is a pretty expensive operation but I don't see any way to avoid it
|
||||||
|
SUBMODULE_STATUS=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status)
|
||||||
|
# Look through for submodules prefixed with '-' (need init), or '+' (need update)
|
||||||
|
NEED_GIT_RECONFIG=$(shell echo "$(SUBMODULE_STATUS)" | grep -c '^\(+\|-\)')
|
||||||
|
|
||||||
|
ifeq ($(NEED_GIT_RECONFIG),0)
|
||||||
|
else
|
||||||
|
# If the submodules have changed then always execute config.mk
|
||||||
|
.PHONY: config.mk
|
||||||
|
endif
|
||||||
|
|
||||||
config.mk: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
|
config.mk: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
|
||||||
@$(call E, cfg: reconfiguring)
|
@$(call E, cfg: reconfiguring)
|
||||||
$(Q)$(S)configure $(CFG_CONFIGURE_ARGS)
|
$(Q)$(S)configure $(CFG_CONFIGURE_ARGS)
|
||||||
|
|
Loading…
Reference in New Issue