-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Makefile.features: add declarative FEATURES_ variables definition #11492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
700b5fb
makefiles: Update FEATURES_OPTIONAL meaning
cladmi e1c60ea
Makefile.features: declare FEATURES_MISSING and make use of it
cladmi 9cccc30
Makefile.features: declare FEATURES_USED and make use of it
cladmi 6d7a70b
Makefile.features: declare FEATURES_CONFLICTING and make use of it
cladmi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,33 @@ | ||
| # Process FEATURES variables | ||
|
|
||
| include $(RIOTBOARD)/$(BOARD)/Makefile.features | ||
|
|
||
|
|
||
| # Resolve FEATURES_ variables | ||
| # Their value will only be complete after resolving dependencies | ||
|
|
||
| # 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 that are only optional and not required at the same time. | ||
| # The policy is to by default use by features if they are provided by the BSP. | ||
| FEATURES_OPTIONAL_ONLY = $(sort $(filter-out $(FEATURES_REQUIRED),$(FEATURES_OPTIONAL))) | ||
| FEATURES_OPTIONAL_USED = $(sort $(filter $(FEATURES_PROVIDED),$(FEATURES_OPTIONAL_ONLY))) | ||
| # Optional features that will not be used because they are not provided | ||
| FEATURES_OPTIONAL_MISSING = $(sort $(filter-out $(FEATURES_PROVIDED),$(FEATURES_OPTIONAL_ONLY))) | ||
|
|
||
| # Features that are used for an application | ||
| FEATURES_USED = $(sort $(FEATURES_REQUIRED) $(FEATURES_OPTIONAL_USED)) | ||
|
|
||
| # Used features that conflict when used together | ||
| FEATURES_CONFLICTING = $(sort $(foreach conflict,$(FEATURES_CONFLICT),$(call _features_conflicting,$(conflict)))) | ||
|
|
||
| # Return conflicting features from the conflict string feature1:feature2 | ||
| # $1: feature1:feature2 | ||
| # Return the list of conflicting features | ||
| _features_conflicting = $(if $(call _features_used_conflicting,$(subst :, ,$1)),$(subst :, ,$1)) | ||
| # Check if all features from the list are used | ||
| # $1: list of features that conflict together | ||
| # Return non empty on error | ||
| _features_used_conflicting = $(filter $(words $1),$(words $(filter $(FEATURES_USED),$1))) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.