Makefile.include: include Makefile.features after $(CPU)/Makefile.include#11424
Makefile.include: include Makefile.features after $(CPU)/Makefile.include#11424fjmolinas wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
|
features are also evaluated by the "info-boards-supported" machinery, which in turn cannot include cpu/Makefile.features, as this happens in a single Makefile run. That machinery would break with the proposed change.
|
|
The issue is also present in the RIOT/cpu/efm32/Makefile.features Lines 9 to 11 in d16d911 TRNG but fixing it changes nothing).
The problem should however be solved the other way around, with these variables all defined by It cannot currently be done as And indeed, there is also this file https://github.com/RIOT-OS/RIOT/blob/master/makefiles/info-global.inc.mk#L10 that does the evaluation in a different way for getting the dependencies. The two way of doing the parsing already leads to inconsistencies: |
|
@cladmi @kaspar030 Thanks for your insight into the build system! I understand even though this is a valid problem this PR is not the propper way of fixing the issue. I will close this PR and raise the issue in #9913 (I had missed it when opening this PR). |
Contribution description
Currently in base Makefile.include, Makefile.fatures for a BOARD is included after
$(RIOTCPU)/$(CPU)/Makefile.include.RIOT/Makefile.include
Lines 247 to 258 in 9a64731
This causes the below statement to have no effect since KINETIS_SERIES isn't defined at this point. But more generaly means none of the variables defined are in
$(RIOTCPU)/$(CPU)/Makefile.includeare yet available.RIOT/cpu/kinetis/Makefile.features
Lines 5 to 9 in 9a64731
Moving Makfile.features below
include $(RIOTCPU)/$(CPU)/Makefile.include. would allow using the SERIES, FAMILY, etc. to include some features for the specific group.I'm not sure of the impact of this change, I would like @cladmi insight on the matter. Based on my inspection of the build system there would be no negative impact since FEATURES_PROVIDED are first used by Makefile.dep. Also Makefile.features files only reference themselves so this doesn't affect the include
$(RIOTBOARD)/$(BOARD)/Makefile.includeand$(RIOTCPU)/$(CPU)/Makefile.include.Testing procedure
All applications for all boards should still compile as expected.
To see this fixes #11423 add
$(info Kinetis series: $(KINETIS_SERIES))just before the above the code below and callmake -C examples/hello-world/ BOARD=pba-d-01-kw2x.RIOT/cpu/kinetis/Makefile.features
Lines 5 to 9 in 9a64731
Without this PR:
Without this PR:
Issues/PRs references
Could fix #11423.
Related to #8713