make: process include and dep for external modules#8987
make: process include and dep for external modules#8987jia200x merged 2 commits intoRIOT-OS:masterfrom
Conversation
e1db08c to
f55affb
Compare
|
Nice one, and one step towards |
f55affb to
33f3fe0
Compare
|
I reformulated and split in two bullet points for Makefile.include and Makefile.dep @danpetry if you want to check the English too :) |
33f3fe0 to
c0b4997
Compare
|
Rebased the conflicting file. |
smlng
left a comment
There was a problem hiding this comment.
Tested with native on macOS, samr21-xpro, and arduino-mega2560 - runs perfectly on all of them.
|
ping @kaspar030 |
c0b4997 to
38ef889
Compare
38ef889 to
03e9421
Compare
|
Rebased on master. As it was merged after writing this PR, I found out that currently this PR does not talk about defining |
03e9421 to
bb89a8a
Compare
|
Ping @kaspar030 |
|
@kaspar030 are you satisfied with the rewording? |
|
@kaspar030 ping. |
|
@jia200x would you like to have this for the release? If so, we need to dismiss @kaspar030 review. |
bb89a8a to
578b66d
Compare
Would be nice to have this for the Release. @kaspar030 last call? |
1 similar comment
Would be nice to have this for the Release. @kaspar030 last call? |
tests/external_module_dirs/README.md
Outdated
|
|
||
| * Adding a module with source code | ||
| * Setting a header include directory | ||
| * Adding dependences, which are evaluated before other modules dependencies |
Yes. |
2 similar comments
Yes. |
Yes. |
|
Updated the last comment. |
|
@kaspar030 are you OK with the changes? Could you (N)ACK? |
|
lgtm |
|
@cladmi pls squash! |
Process `Makefile.include` for external modules. It is included after the others so it could overwrite some of the configuration if wanted. Process `Makefile.dep` for external modules. It is included before the others so it could be parsed before setting 'default' values to dependencies.
It demonstrates: * Adding a module with source code * Setting a header include directory * Adding dependences, which are evaluated before other modules dependencies If the application compiles, everything is ok.
c084430 to
4157a07
Compare
|
Squashed, waiting for murdock. |
|
murdock is happy. Let's merge it then ;) |
|
@cladmi thank you for this contribution |
|
Thanks all for reviewing and merging. |
Allow using
EXTERNAL_MODULE_DIRSfor complete modules with configuration and dependencies as if they were in RIOT.It gives them the same possibilities as packages when all files are already there and do not need to be downloaded.
Contribution description
Process
Makefile.includefor external modules. It is included after the othersso it could overwrite some of the configuration if wanted.
Process
Makefile.depfor external modules. It is included before the others soit could be parsed before setting 'default' values to dependencies.
Compile time testing
I added a test that checks at compile time the header inclusion, linking and parsing dependencies.
Pre-contrib
I needed to makeUSEMODULE_INCLUDES_an immediate variable to allow usingMAKEFILE_LISTto define an include directory. Not really sure why though :/ I know why the fix makes it work, not why it is required in the first place.In the external module makefile include, I need to use an immediate variable to evaluate
MAKEFILE_LISTdirectly.Issues/PRs references
Would allow using modules without modifying RIOT with a mechanism like #7523