-
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
Makefile.include: fix board/cpu inconsistent include order #8717
Conversation
Makefile.include
Outdated
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include | ||
include $(RIOTBOARD)/$(BOARD)/Makefile.include |
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.
There could be a reason to include defaultmodules.inc.mk and pseudomodules.inc.mk in the same order as before, in case they are used by the board and cpu makefiles.
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.
There are currently no difference, but I agree there is no reason to change the order. I will fix it.
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.
I agree with the general idea, but see my inline comment regarding makefile include order
ping @gebart |
I developed some scripts to check the difference in included headers for #8652. I will run them for this PR too to check that indeed no includes changed and give some more tested feedback. |
I ran buildtest on all I did not run on tests at the same time because it was taking too much space as packages are re-downloaded many times. I could re-run it only on tests if you want. |
Not release critical, untagging. |
Include order for board and cpu was 1. cpu include 2. board include 3. board common includes 4. cpu common includes Its now changed to: 1. board include 2. board common includes 3. cpu include 4. cpu common includes Verifications: There are no common headers names between boards and cpus. Except native that has a 'periph_conf.h' in cpu instead of being in board.
5f93b8b
to
f7f2494
Compare
Rebased, and I re-ran the test mentioned and there is still no names conflicts. |
tested on macOS for native, output for master
This PR
Order looks better and works but for native there are several duplicated includes which looks a bit strange - this just an info and might be worth looking into in a followup PR |
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.
tested ACK
Murdock is happy, thank you for testing. |
The duplicate includes for native are there because currently RIOT/boards/native/Makefile.include Line 127 in 40c28d7
|
Contribution description
Re-organize headers include directories order to be consistent to include first all things related to board then all things related to CPU.
I did a check to verify there were no header names conflicts between boards and cpu so changing the order has no impact. Output and verification script below.
Details
Include order for board and cpu was
Its now changed to:
Further steps
I plan to move the two lines with "INCLUDE +=" and "include ../Makefile.include" into dedicated files in boards and cpu to allow further cleanup, but it requires the include order to be solved before.
Changes INCLUDES output
Using #8714 with
examples/gnrc_networking
foriotlab-m3
:Without the PR, notice the
cpu/stm32f1
before the boards include:With the PR
Verifications
There are no common headers names between boards and cpus.
Except native that has a 'periph_conf.h' in cpu instead of being in board.
I used the following script to test this.
Issues/PRs references
Part of Issue #8713