From 040628894c929accd4fca111ecbe23549c15dbde Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 24 Aug 2021 12:31:01 +0200 Subject: [PATCH] build: introduce GLOBAL_DEPS variable The new varible can be used to trigger the rebuild of the entire target whenever any of the listed files changes. Fixes #4255 --- repos/base/mk/generic.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/repos/base/mk/generic.mk b/repos/base/mk/generic.mk index 31d2e67115..66e5c309c4 100644 --- a/repos/base/mk/generic.mk +++ b/repos/base/mk/generic.mk @@ -26,7 +26,12 @@ $(SUB_DIRS): # # Make sure that we rebuild object files and host tools after Makefile changes # -$(wildcard $(OBJECTS)) $(HOST_TOOLS): $(filter-out $(LIB_PROGRESS_LOG),$(MAKEFILE_LIST)) +# The 'GLOBAL_DEPS' variable contains a list of files with side effects on the +# build result that not captured by the regular .d-file mechanism. Changes of +# such files - in particular build-description files - trigger a whole rebuild. +# +GLOBAL_DEPS += $(filter-out $(LIB_PROGRESS_LOG),$(MAKEFILE_LIST)) +$(wildcard $(OBJECTS)) $(HOST_TOOLS): $(GLOBAL_DEPS) INCLUDES := $(addprefix -I,$(wildcard $(ALL_INC_DIR)))