-
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
make: improve module dependencies #5891
Conversation
- calls itself recursively until all dependencies are resolved - automatically include boards/$board/Makefile.dep - automatically include pkg/$pkg/Makefile.dep
Is it safe to include makefiles recursively? |
I think yes...
I don't know how to, with make. No loop constructs...
I did some simple tests, the number of open files seems to be the recursion limit:
|
ping |
Unmarked RFC and WIP as everything compiles well. |
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.
Confirmed (tested with with some more complex applications). ACK & go
@@ -555,3 +530,13 @@ ifneq (,$(filter random,$(USEMODULE))) | |||
USEMODULE += tinymt32 | |||
endif | |||
endif | |||
|
|||
# include package dependencies | |||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep) |
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.
Arghs... Should have looked at this more careful. Now one NEEDS to mention a packet right? (except lwIP which is still above for some weird reason).
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.
Yep. lwip has it's dependencies still in the main Makefile.dep, that's why no explicit "USEPKG" is needed.
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 thought that is actually cleaner than before.
It would be possible, though, to USEPKG all modules edit from USEMODULE edit that have a directory in pkg/
.
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.
Mh… might be true that an explicit mentioning of a package in USEPKG
might be cleaner, but it is very inconvenient 😄
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.
VERY!! inconvenient!!! ;)
Seriously, this opens the way to "magic package names" where you'd just mention "USEPKG += foo" and some Makefile automagically gets the package metadata from "github.com/riot-packages/foo.git", ...
thx for testing! 😄 |
add missing Makefile.dep files to boards remote-pa, remote-reva, and remote-revb, as introduced by RIOT-OS#5891. Otherwise certain features are not working, such as radio.
add missing Makefile.dep files to boards remote-pa, remote-reva, and remote-revb, as introduced by RIOT-OS#5891. Otherwise certain features are not working, such as radio.
add missing Makefile.dep files to boards remote-pa, remote-reva, and remote-revb, as introduced by RIOT-OS#5891. Otherwise certain features are not working, such as radio.
This PR tries to improve our module dependency system:
I've adapted some packages, but would like to hear comments for the approach in general before investing more work.