make: handle disabled default modules before dependencies#10744
Conversation
|
Maybe I'm using/understanding it wrong, but it isn't working for me. I have a board that includes I run |
Unfortunately, despite it's naming, DISABLE_MODULE only works for DEFAULT_MODULES. This PR is the first, there are more to come that together will allow disabling stdio_uart... |
|
The only definitions of However, I do not really understood the issue that it will solve. The values in I also mix a bit the order with depends on is dependent on so cannot really see the goal right now. If A depends on B, you disable B, but still request A. I would maybe expect it to fail, not silently add B because it is a dependency. I do not think that you should able to say add and remove something at the same time. But we may indeed be missing a mechanism for your need. |
Contribution description
Currently, default modules can be disabled by adding the name to
DISABLE_MODULE.Unfortunately, this gets parsed after resolving the dependencies.
This makes it impossible to disable e.g., stdio_uart and implicitly periph/uart. The dependency parsing would select periph/uart (as it is dependend on stdio_uart), but later stdio_uart would be dropped, leaking the dependency.
This PR moves
DISABLE_MODULEbefore dependency resolution.Testing procedure
Correct compilation of all applications should suffice.
Issues/PRs references
#10741