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

Makefile.dep: Add auto_init_% DEFAULT_MODULES only once

The logic that adds auto_init_% DEFAULT_MODULES was placed at the end of
Makefile.dep, which is recursively included. That means that the logic
is executed multiple times.

This moves the logic so it is only executed once, when the break
condition of the iteration is met.
This commit is contained in:
Leandro Lanzieri 2020-02-18 17:22:27 +01:00
parent 5d8aecdb76
commit 20bbe439c6

View File

@ -1052,10 +1052,12 @@ USEMODULE := $(sort $(USEMODULE))
USEPKG := $(sort $(USEPKG))
ifneq ($(OLD_USEMODULE) $(OLD_USEPKG),$(USEMODULE) $(USEPKG))
include $(RIOTBASE)/Makefile.dep
endif
# Add auto_init_% DEFAULT_MODULES. This is done after the recursive cach since
# none of these modules can trigger dependency resolution.
ifneq (,$(filter auto_init,$(USEMODULE)))
USEMODULE += $(filter auto_init_%,$(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)))
else
# Add auto_init_% DEFAULT_MODULES. This is done after the recursive cach since
# none of these modules can trigger dependency resolution.
ifneq (,$(filter auto_init,$(USEMODULE)))
DEFAULT_MODULE := $(sort $(DEFAULT_MODULE))
USEMODULE += $(filter auto_init_%,$(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)))
USEMODULE := $(sort $(USEMODULE))
endif
endif