Makefile.include: fix board/cpu inconsistent include order#8717
Makefile.include: fix board/cpu inconsistent include order#8717cladmi merged 1 commit intoRIOT-OS:masterfrom
Conversation
Makefile.include
Outdated
|
|
||
| # Include Board configuration | ||
| INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include | ||
| include $(RIOTBOARD)/$(BOARD)/Makefile.include |
There was a problem hiding this comment.
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.
There are currently no difference, but I agree there is no reason to change the order. I will fix it.
jnohlgard
left a comment
There was a problem hiding this comment.
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 masterThis PROrder 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 |
|
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_networkingforiotlab-m3:Without the PR, notice the
cpu/stm32f1before 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