diff --git a/makefiles/dependencies_debug.inc.mk b/makefiles/dependencies_debug.inc.mk index 5926b61357..e8cb46db19 100644 --- a/makefiles/dependencies_debug.inc.mk +++ b/makefiles/dependencies_debug.inc.mk @@ -50,6 +50,13 @@ file_save_dependencies_variables = $(call file_save_variable,$(DEPENDENCY_DEBUG_ # Remove file before to be sure appending is started with an empty file file_save_variable = $(shell mkdir -p $(dir $1); rm -f $1)$(foreach v,$2,$(file >>$1,$(call _print_var,$v))) +# print variables sorted, this can eliminate false positives but will not allow +# to tell in what order the variables where updated. +DEPENDENCY_DEBUG_SORT_VARS ?= 0 # Remove spaces in case of empty value # Remove spaces around value as it happens -_print_var = $(strip $1 = $(strip $($1))) +ifneq (1,$(DEPENDENCY_DEBUG_SORT_VARS)) + _print_var = $(strip $1 = $(strip $($1))) +else + _print_var = $(sort $(strip $1 = $(strip $($1)))) +endif