mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles: Minor clean ups
- Add FEATURES_REQUIRED_ANY to dependency-debug: Now `make dependency-debug` by default also stores the contents of `FEATURES_REQUIRED_ANY`. - makefiles/features_check.inc.mk: Break long lines - {tests/minimal,tests/unittests,bootloaders/riotboot}: Disable auto_init_% in addition to auto_init. This works around weird behavior due to the USEMODULE being recursively expended in the first iteration of dependency resolution: Modules added to DEFAULT_MODULE get automatically added to USEMODULE during the first run, but not for subsequent. This should be iron out later on.
This commit is contained in:
parent
7bc15acee2
commit
af21f15b02
@ -15,7 +15,7 @@ CFLAGS += -DRIOTBOOT
|
||||
# Disable unused modules
|
||||
CFLAGS += -DNDEBUG -DLOG_LEVEL=LOG_NONE
|
||||
DISABLE_MODULE += core_init core_msg core_panic
|
||||
DISABLE_MODULE += auto_init
|
||||
DISABLE_MODULE += auto_init auto_init_%
|
||||
|
||||
# avoid using stdio
|
||||
USEMODULE += stdio_null
|
||||
|
@ -39,12 +39,17 @@ DEPENDENCY_DEBUG_OUTPUT_DIR ?= $(CURDIR)
|
||||
|
||||
# Save variables that are used for parsing dependencies
|
||||
_DEPS_DEBUG_VARS += BOARD CPU CPU_MODEL CPU_FAM
|
||||
_DEPS_DEBUG_VARS += FEATURES_PROVIDED _FEATURES_PROVIDED_SORTED FEATURES_REQUIRED _FEATURES_REQUIRED_SORTED FEATURES_OPTIONAL FEATURES_USED FEATURES_MISSING FEATURES_CONFLICT FEATURES_CONFLICTING
|
||||
_DEPS_DEBUG_VARS += FEATURES_PROVIDED _FEATURES_PROVIDED_SORTED
|
||||
_DEPS_DEBUG_VARS += FEATURES_REQUIRED _FEATURES_REQUIRED_SORTED
|
||||
_DEPS_DEBUG_VARS += FEATURES_REQUIRED_ANY _FEATURES_REQUIRED_ANY_SORTED
|
||||
_DEPS_DEBUG_VARS += FEATURES_OPTIONAL FEATURES_USED FEATURES_MISSING
|
||||
_DEPS_DEBUG_VARS += FEATURES_CONFLICT FEATURES_CONFLICTING
|
||||
_DEPS_DEBUG_VARS += USEMODULE DEFAULT_MODULE DISABLE_MODULE
|
||||
DEPS_DEBUG_VARS ?= $(_DEPS_DEBUG_VARS)
|
||||
|
||||
_FEATURES_PROVIDED_SORTED = $(sort $(FEATURES_PROVIDED))
|
||||
_FEATURES_REQUIRED_SORTED = $(sort $(FEATURES_REQUIRED))
|
||||
_FEATURES_REQUIRED_ANY_SORTED = $(sort $(FEATURES_REQUIRED_ANY))
|
||||
|
||||
file_save_dependencies_variables = $(call file_save_variable,$(DEPENDENCY_DEBUG_OUTPUT_DIR)/$1_$(BOARD),$(DEPS_DEBUG_VARS))
|
||||
# Remove file before to be sure appending is started with an empty file
|
||||
|
@ -39,13 +39,19 @@ FEATURES_REQUIRED_ONE_OUT_OF := $(foreach item,\
|
||||
|
||||
# Features that are required by the application but not provided by the BSP
|
||||
# Having features missing may case the build to fail.
|
||||
FEATURES_MISSING := $(sort $(filter-out $(FEATURES_PROVIDED),$(FEATURES_REQUIRED) $(FEATURES_REQUIRED_ONE_OUT_OF)))
|
||||
FEATURES_MISSING := $(sort \
|
||||
$(filter-out $(FEATURES_PROVIDED),\
|
||||
$(FEATURES_REQUIRED) $(FEATURES_REQUIRED_ONE_OUT_OF)))
|
||||
|
||||
# Features that are used for an application
|
||||
FEATURES_USED := $(sort $(FEATURES_REQUIRED) $(FEATURES_REQUIRED_ONE_OUT_OF) $(FEATURES_OPTIONAL_USED))
|
||||
FEATURES_USED := $(sort $(FEATURES_REQUIRED) \
|
||||
$(FEATURES_REQUIRED_ONE_OUT_OF) \
|
||||
$(FEATURES_OPTIONAL_USED))
|
||||
|
||||
# Used features that conflict when used together
|
||||
FEATURES_CONFLICTING := $(sort $(foreach conflict,$(FEATURES_CONFLICT),$(call _features_conflicting,$(conflict))))
|
||||
FEATURES_CONFLICTING := $(sort $(foreach conflict,\
|
||||
$(FEATURES_CONFLICT),\
|
||||
$(call _features_conflicting,$(conflict))))
|
||||
|
||||
# Return conflicting features from the conflict string feature1:feature2
|
||||
# $1: feature1:feature2
|
||||
|
@ -3,7 +3,7 @@ include ../Makefile.tests_common
|
||||
|
||||
CFLAGS += -DNDEBUG -DLOG_LEVEL=LOG_NONE
|
||||
|
||||
DISABLE_MODULE += auto_init
|
||||
DISABLE_MODULE += auto_init auto_init_%
|
||||
DISABLE_MODULE += test_utils_interactive_sync
|
||||
|
||||
USEMODULE += stdio_null
|
||||
|
@ -11,7 +11,7 @@ else
|
||||
UNIT_TESTS := $(filter tests-%, $(MAKECMDGOALS))
|
||||
endif
|
||||
|
||||
DISABLE_MODULE += auto_init
|
||||
DISABLE_MODULE += auto_init auto_init_%
|
||||
|
||||
# boards using arduino bootloader require auto_init to
|
||||
# automatically initialize stdio over USB. Without this, the bootloader
|
||||
|
Loading…
Reference in New Issue
Block a user