-
Notifications
You must be signed in to change notification settings - Fork 2k
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
dist/buildsystem_sanity_check: add check for CPU/CPU_MODEL migration #12337
dist/buildsystem_sanity_check: add check for CPU/CPU_MODEL migration #12337
Conversation
This one has overlap with #12338 as it fixes the need for a blacklist of |
6eb31e0
to
7aa9dd4
Compare
CPU Makefile.include/Makefile.features/Makefile.dep must not be included by the board directly anymore.
CPU and CPU_MODEL variables must now be defined by `boards/**/Makefile.features` or 'cpu/CPU/Makefile.features' files instead of `**/Makefile.include. Currently blacklist the slwstk6000b that still define 'CPU_MODEL' in a file that is not a 'Makefile.features. This allows getting this sanity check script in master This allow using the variables when parsing dependencies.
CPU must be defined by `$(RIOTBOARD)/$(BOARD)/Makefile.features` or one of its common included Makefile.features file. This currently only adds a warning but not prevents building for the moment.
7aa9dd4
to
4277624
Compare
I rebased and adapted now that #12338 is merged. I update the check as now The documentation and the test do not precise that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a compile-time check to ensure all board Makefiles are following the standard.
Murdock just confirmed all boards pass that check.
This prevents new board additions from violating those standards.
Thank you for the review. |
Contribution description
Static tests to ensure.
CPU Makefile.include/Makefile.features/Makefile.dep must not be
included by the board directly anymore.
CPU and CPU_MODEL variables must now be defined by
boards/**/Makefile.features
files instead of `**/Makefile.include.CPU is defined by board Makefile.features with a warning
This currently blacklist the slwstk6000b and cortexm.inc.mk that still define
'CPU_MODEL' in a file that is not a 'Makefile.features.
This allows getting this sanity check script in master
Depends on
boards/slwstk6000b: move CPU definiton to Makefile.features boards/slwstk6000b: move CPU definiton to Makefile.features #12334boards: remove duplicate include 'RIOTCPU/cpu/Makefile.features' boards: remove duplicate include 'RIOTCPU/cpu/Makefile.features' #12335This is currently only warning during build that
CPU
is not defined. I have commits in #11477 to enforce it, not sure if we want it already or not.Testing procedure
The static tests do not fail, and no warning for any board regarding defining
CPU
.When reverting both depending commits and removing the blacklist lines, the forbidden outputs are matched:
And the warning is triggered:
Issues/PRs references
Depends on
boards/slwstk6000b: move CPU definiton to Makefile.features boards/slwstk6000b: move CPU definiton to Makefile.features #12334boards: remove duplicate include 'RIOTCPU/cpu/Makefile.features' boards: remove duplicate include 'RIOTCPU/cpu/Makefile.features' #12335Part of Tracking: move CPU/CPU_MODEL to Makefile.features #11477