make: refactor info targets & cleanup buildtest#7589
Conversation
haukepetersen
left a comment
There was a problem hiding this comment.
Awesome! On a first quick look the changes look valid to me, though I have not run any tests yet, so a further review is to be done...
makefiles/features.inc.mk
Outdated
| @@ -1,6 +1,5 @@ | |||
| # import list of provided features | |||
| -include $(RIOTBOARD)/$(BOARD)/Makefile.features | |||
There was a problem hiding this comment.
wondering: with the boards Makefile.features now including the CPUs Makefile.features, shouldn't we force the existence of a Makefile.features for every board (-> removing the minus sign in this line)? As there might be features provided by a CPU that are not looked at in case a board does not provide a Makefile.features...
aabadie
left a comment
There was a problem hiding this comment.
Had a brief look and saw some indentation issues.
Makefile.include
Outdated
| endif | ||
|
|
||
| ifeq (none,$(BOARD)) | ||
| include $(RIOTMAKE)/info-global.inc.mk |
|
|
||
| # include multislot support | ||
| include $(RIOTMAKE)/multislot.mk | ||
| endif # BOARD=none |
There was a problem hiding this comment.
The indentation above seems off (not related to this PR though)
There was a problem hiding this comment.
Actually, it is. But I didn't want to indent the whole file (or most of it), so I intentionally didn't indent the "BOARD!=none" case.
| FEATURES_OPTIONAL_GLOBAL := $(FEATURES_OPTIONAL) | ||
| DISABLE_MODULE_GLOBAL := $(DISABLE_MODULE_GLOBAL) | ||
|
|
||
| define board_missing_features |
There was a problem hiding this comment.
indentation is off in this function
There was a problem hiding this comment.
Looks fine here, all tabs. anything specific?
There was a problem hiding this comment.
Before it was not indented this way. That's why I pointed this out. I don't know what's the best practice here
There was a problem hiding this comment.
fixed it to two spaces
|
Fixes #7033 |
miri64
left a comment
There was a problem hiding this comment.
Tested with tests/driver_at86rf2xx and test/unittests. info-buildsizes does not put out the build sizes, just the boards, info-files misses all the non-Make files, info-features-missing has no output for tests/unittests.
|
(otherwise I'm fine with the changes and would approve, if pointed out errors are fixed). |
fixed.
Both is also true for master... |
aabadie
left a comment
There was a problem hiding this comment.
Well, there are still indentation issues but that's fine.
ACK
As far as I can see it, all your comments are addressed. @kaspar030 please squash. |
Yes, but I saw it in other places... |
|
@kYc0o found something not working on OS X (the color makefile parsing was moved before assignment of the OS variable, which broke OS X's special handling). The fix is simple, but I think it needs a re-ack. |
In theory I would ACK, but can't test that. @kYc0o? |
|
@kaspar030 can you squash? |
|
squashed. |
kYc0o
left a comment
There was a problem hiding this comment.
ACK. But I hope a PR fixing the feature check for all targets comes soon :)
|
Go! |
Previously, our build system mixed local targets (corresponding to one board, e.g.,
make all) and global targets (corresponding to all boards, e.g.,make info-boards-supported).Half of the build defines was set for
$BOARD, and the dependencies were only parsed for one board.This had several side effects, most notable:
make info-boards-supportedcould not take dependencies into accountmake buildtestneeded to reset most variables to sane values, which looked uglyThis PR essentially cuts the build parsing in two modes: a "build for one board" mode, which is the default, and a "global targets" mode, which is selected automatically if one of the "global" targets is in $(MAKECOMMANDGOALS).
The latter case now re-parses the dependencies for every board. That means if e.g., a driver has
FEATURES_REQUIRED += xxx, that dependency gets properly handled for e.g.,info-boards-supported. As a nice side effect, this is now almost twice as fast.I took the liberty to remove a lot of now unnecessary cruft from buildtest.
Unfortunately all board Makefile.features now must include the CPU's Makefile.features, but the CPU is not known, thus it's name must be hard-coded in the include path. I consider this a minor uglyness compared to the vast cleanup this PR offers.