1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/dependencies_debug.inc.mk: add DEPENDENCY_DEBUG_SORT_VARS

Define DEPENDENCY_DEBUG_SORT_VARS that can be set as 1 so that
DEPS_DEBUG_VARS are sorted before saving to file.
This commit is contained in:
Francisco Molina 2020-01-28 13:02:10 +01:00
parent 98995f685b
commit 8b9afc3fed

View File

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