mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
Makefile.dep: filter periph_int modules
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
This commit is contained in:
parent
ab5deca3b0
commit
9279282acb
24
Makefile.dep
24
Makefile.dep
@ -1060,29 +1060,37 @@ USEPKG := $(sort $(USEPKG))
|
||||
ifneq ($(OLD_USEMODULE) $(OLD_USEPKG),$(USEMODULE) $(USEPKG))
|
||||
include $(RIOTBASE)/Makefile.dep
|
||||
else
|
||||
|
||||
# set all USED periph_% init modules as DEFAULT_MODULE
|
||||
ifneq (,$(filter periph_init, $(USEMODULE)))
|
||||
DEFAULT_MODULE += $(subst periph_,periph_init_,$(filter periph_%,$(USEMODULE)))
|
||||
# To enable adding periph_% modules through the environment we cant use
|
||||
# FEATURES_USED since the MODULE might be added directly as USEMODULE
|
||||
PERIPH_MODULES_NO_INIT = periph_init% periph_common
|
||||
PERIPH_MODULES = $(filter periph_%,$(USEMODULE))
|
||||
PERIPH_INIT_MODULES = $(subst periph_,periph_init_,\
|
||||
$(filter-out $(PERIPH_MODULES_NO_INIT),$(PERIPH_MODULES)))
|
||||
DEFAULT_MODULE += $(PERIPH_INIT_MODULES)
|
||||
endif
|
||||
|
||||
# add periph_init_% modules to USEMODULE unless disabled
|
||||
ifneq (,$(filter periph_init, $(USEMODULE)))
|
||||
USEMODULE += $(filter $(PERIPH_INIT_MODULES),\
|
||||
$(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)))
|
||||
endif
|
||||
|
||||
# Add auto_init_% DEFAULT_MODULES. This is done after the recursive cach since
|
||||
# none of these modules can trigger dependency resolution.
|
||||
DEFAULT_MODULE := $(sort $(DEFAULT_MODULE))
|
||||
ifneq (,$(filter auto_init,$(USEMODULE)))
|
||||
USEMODULE += $(filter auto_init_%,$(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)))
|
||||
endif
|
||||
|
||||
# Add auto_init_periph_% to DEFAULT_MODULES. This is done after the recursive
|
||||
# cach since none of these modules can trigger dependency resolution.
|
||||
ifneq (,$(filter periph_init,$(USEMODULE)))
|
||||
USEMODULE += $(filter periph_init_%,$(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)))
|
||||
endif
|
||||
|
||||
# Add test_utils_interactive_sync_shell
|
||||
ifneq (,$(filter test_utils_interactive_sync,$(USEMODULE)))
|
||||
USEMODULE += $(filter test_utils_interactive_sync_%, \
|
||||
$(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)))
|
||||
endif
|
||||
|
||||
# Sort and remove duplicates
|
||||
DEFAULT_MODULE := $(sort $(DEFAULT_MODULE))
|
||||
USEMODULE := $(sort $(USEMODULE))
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user