-
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: add possibility to provide board specific application dependencies in a separate Makefile #12755
Conversation
Testing procedure.
NOTE: the only reason why there is no change is because |
@aabadie maybe add a static check so no
happens in |
Why does moving them to a separate Makefile make |
Don't get me wrong, I really appreciate that you guys try to get rid of |
The "info-boards-supported" machinery is executed after the application makefile. Thus any logic within the application logic has been applied. That includes any conditionals based on the (default) board. E.g., if the application makefile has |
And how does adding this to a separate |
No, the separate Makefile.dep is be included from the main Makefile.dep, which is in turn evaluated from info-boards-supported, which sets the correct BOARD value in each iteration. |
I think I slowly start to understand... |
Ok, I'm fine with the changes, but don't have the time to test this right now. There should however be some doc somewhere, clarifying when a |
+1. IMO, rule of thumb should be, only use Makefile.dep for the necessary rules. |
Yepp, but it is very important to state what those "necessary rules" are ;-) |
6082949
to
894b506
Compare
Ok, I think that this PR is now following this rule. In each application Makefile.dep, I added a comment that explain what should be added there. |
Let me know if/when I can squash ;) |
Still don't have any confirmation what those "necassary rules" are. Also, as there is a clear distinction between the |
Maybe |
e29aecd
to
526d2d1
Compare
As I understood @kaspar030,'s comment, these are only the rules that are board specific and defined in the application Makefile. |
If that were true, all |
It seems to me that you are misunderstanding how Of course, the application Makefile is parsed, so all USEMODULE, FEATURES_REQUIRED are parsed but not the ones that are dependent on a board (e.g. inside an We need to handle that board specific logic in a an extra file that is parsed by the normal build and by info-board-supported. |
I think there is a misunderstanding, yes, but not about functional things. I'm arguing that the name |
(and my point is: we should rename |
526d2d1
to
b184007
Compare
@miri64, ok to squash ? |
For my part, yes. |
0a0678d
to
f6e0756
Compare
Thanks, then I squashed. |
f6e0756
to
75751e5
Compare
This commit allows to add a Makefile.dep file in an application directory to finely tune application dependencies, based on a board. Using this mechanism, if an application has dependencies pulled-in based on a board, info-boards-supported, will take this into account to determine the boards supported by an application
75751e5
to
6d5f64b
Compare
This PR could also be considered as an improvement for #9913 |
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.
No changes in dependencies. ACK!
git checkout pr-12755 -f; for app in tests/gnrc_sock_dns tests/gnrc_tcp tests/gnrc_rpl_srh tests/gnrc_ipv6_ext_frag tests/gnrc_ipv6_ext; do make --no-print-directory -C ${app} info-boards-supported; done > pr.txt; git checkout upstream/master; for app in tests/gnrc_sock_dns tests/gnrc_tcp tests/gnrc_rpl_srh tests/gnrc_ipv6_ext_frag tests/gnrc_ipv6_ext; do make --no-print-directory -C ${app} info-boards-supported; done > master.txt; diff pr.txt master.txt
#no diff
GO! |
Contribution description
This PR adds a way for providing complex (for example board related) application dependencies in a separate Makefile.dep in the application directory.
There is a direct consequence on the behaviour of the
info-boards-supported
target: when the Makefile.dep is provided, the result of this target the same one as the expected one returned by the build system. In short, this PR allows for fixing a weak point ofinfo-boards-supported
.This was the cleanest solution to solve build/ci issues in #12724 and #12304 (in fact these PRs include the commit provided here).
Testing procedure
make info-boards-supported
is unchanged in the modified test applications.Issues/PRs references
Required by #12304 and #12724