From fa9d6c5e4382ab7d7ff04a76696a4a496d58f631 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Fri, 2 Mar 2018 16:27:12 +0800 Subject: [PATCH] build: reconfigure when selection state of subpackages changes Signed-off-by: Yousong Zhou --- include/package.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/package.mk b/include/package.mk index 78ea5d0ef8..6c0b434745 100644 --- a/include/package.mk +++ b/include/package.mk @@ -71,6 +71,8 @@ ifneq ($(PREV_STAMP_PREPARED),) else STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS))) endif +STAMP_SELECTED_PACKAGES=$(PKG_BUILD_DIR)/.selected_packages$(if $(DUMP),,_$(words $(BUILD_PACKAGES))_$(call confvar,$(patsubst %,CONFIG_PACKAGE_%,$(BUILD_PACKAGES)))) +STAMP_SELECTED_PACKAGES_WILDCARD=$(PKG_BUILD_DIR)/.selected_packages_$(words $(BUILD_PACKAGES))_* STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS))) STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_* STAMP_BUILT:=$(PKG_BUILD_DIR)/.built @@ -253,6 +255,10 @@ endif BUILD_PACKAGES += $(1) $(STAMP_PREPARED): $$(if $(QUILT)$(DUMP),,$(call find_library_dependencies,$(DEPENDS))) + $(STAMP_CONFIGURED): $$(STAMP_SELECTED_PACKAGES) + $$(STAMP_SELECTED_PACKAGES): + rm -f $$(STAMP_SELECTED_PACKAGES_WILDCARD) + touch $$@ $(foreach FIELD, TITLE CATEGORY SECTION VERSION, ifeq ($($(FIELD)),) -- 2.30.2