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
This commit is contained in:
Norman Feske 2021-08-24 12:31:01 +02:00 committed by Christian Helmuth
parent b5dd1dd01b
commit 040628894c

View File

@ -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)))