mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles: Update FEATURES_OPTIONAL meaning
Update the FEATURES_OPTIONAL meaning to be more in line since FEATURES_USED is defined. Handle FEATURES_OPTIONAL as a configuration from the BSP/build that should not be changed anymore after. `FEATURES_OPTIONAL` are by definition optional so are not supposed to cause a build to fail. Only the 'REQUIRED' ones that are not 'PROVIDED' are 'MISSING'. * Do not change FEATURES_OPTIONAL to remove REQUIRED features * Prepare for having a different variable for the previous value * Update dependency resolution/info-build as FEATURES_OPTIONAL cannot be missing
This commit is contained in:
parent
b6655a2bba
commit
700b5fb835
@ -865,9 +865,6 @@ FEATURES_OPTIONAL += periph_pm
|
||||
# include package dependencies
|
||||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep)
|
||||
|
||||
# remove required features from optional features
|
||||
FEATURES_OPTIONAL := $(filter-out $(FEATURES_REQUIRED),$(FEATURES_OPTIONAL))
|
||||
|
||||
# add all optional but provided features to the list of used features
|
||||
FEATURES_USED := $(sort $(FEATURES_REQUIRED) $(filter $(FEATURES_OPTIONAL),$(FEATURES_PROVIDED)))
|
||||
|
||||
|
@ -622,9 +622,9 @@ ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
|
||||
endif
|
||||
|
||||
# Test if all feature requirements were met by the selected board.
|
||||
ifneq (, $(filter-out $(FEATURES_PROVIDED) $(FEATURES_OPTIONAL), $(FEATURES_REQUIRED)))
|
||||
ifneq (,$(filter-out $(FEATURES_PROVIDED), $(FEATURES_REQUIRED)))
|
||||
$(shell $(COLOR_ECHO) "$(COLOR_RED)There are unsatisfied feature requirements:$(COLOR_RESET)"\
|
||||
"$(sort $(filter-out $(FEATURES_PROVIDED) $(FEATURES_OPTIONAL), $(FEATURES_REQUIRED)))" 1>&2)
|
||||
"$(sort $(filter-out $(FEATURES_PROVIDED), $(FEATURES_REQUIRED)))" 1>&2)
|
||||
EXPECT_ERRORS := 1
|
||||
endif
|
||||
|
||||
|
@ -31,9 +31,7 @@ define board_missing_features
|
||||
FEATURES_MISSING := $$(sort $$(filter-out $$(FEATURES_PROVIDED), $$(FEATURES_REQUIRED)))
|
||||
ifneq (, $$(FEATURES_MISSING))
|
||||
BOARDS_FEATURES_MISSING += "$(1) $$(FEATURES_MISSING)"
|
||||
ifneq (, $$(filter-out $$(FEATURES_OPTIONAL), $$(FEATURES_MISSING)))
|
||||
BOARDS_WITH_MISSING_FEATURES += $(1)
|
||||
endif
|
||||
BOARDS_WITH_MISSING_FEATURES += $(1)
|
||||
endif
|
||||
endef
|
||||
|
||||
|
@ -46,16 +46,18 @@ info-build:
|
||||
@echo 'HEXFILE: $(HEXFILE)'
|
||||
@echo 'FLASHFILE: $(FLASHFILE)'
|
||||
@echo ''
|
||||
@echo 'FEATURES_REQUIRED (excl. optional features):'
|
||||
@echo ' $(or $(sort $(filter-out $(FEATURES_OPTIONAL), $(FEATURES_REQUIRED))), -none-)'
|
||||
@echo 'FEATURES_OPTIONAL (strictly "nice to have"):'
|
||||
@echo ' $(or $(sort $(FEATURES_OPTIONAL)), -none-)'
|
||||
@echo 'FEATURES_REQUIRED:'
|
||||
@echo ' $(or $(sort $(FEATURES_REQUIRED)), -none-)'
|
||||
@echo 'FEATURES_OPTIONAL (optional that are not required, strictly "nice to have"):'
|
||||
@echo ' $(or $(sort $(filter-out $(FEATURES_REQUIRED),$(FEATURES_OPTIONAL))),-none)'
|
||||
@echo 'FEATURES_OPTIONAL (unused optional features):'
|
||||
@echo ' $(or $(sort $(filter-out $(FEATURES_PROVIDED),$(FEATURES_OPTIONAL))), -none-)'
|
||||
@echo 'FEATURES_PROVIDED (by the board or USEMODULE'"'"'d drivers):'
|
||||
@echo ' $(or $(sort $(FEATURES_PROVIDED)), -none-)'
|
||||
@echo 'FEATURES_MISSING (incl. optional features):'
|
||||
@echo ' $(or $(sort $(filter-out $(FEATURES_PROVIDED), $(FEATURES_REQUIRED) $(FEATURES_OPTIONAL))), -none-)'
|
||||
@echo 'FEATURES_MISSING (only non optional features):'
|
||||
@echo ' $(or $(sort $(filter-out $(FEATURES_PROVIDED), $(FEATURES_REQUIRED))), -none-)'
|
||||
@echo 'FEATURES_MISSING (only non-optional features):'
|
||||
@echo ' $(or $(sort $(filter-out $(FEATURES_OPTIONAL) $(FEATURES_PROVIDED), $(FEATURES_REQUIRED))), -none-)'
|
||||
@echo ''
|
||||
@echo 'FEATURES_CONFLICT: $(FEATURES_CONFLICT)'
|
||||
@echo 'FEATURES_CONFLICT_MSG: $(FEATURES_CONFLICT_MSG)'
|
||||
|
Loading…
Reference in New Issue
Block a user