shell: provide submodule for each shell command#16135
shell: provide submodule for each shell command#16135jnohlgard wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
|
Great idea, but this somewhat runs contrary to the idea of having the shell commands with their module (see #16095 for the beginnings of that). That idea would allow for a better coherence of the modules themselves, in my opinion. But I think having the shell commands then be a sub-module of those modules (and |
|
With #16061 in and moving shell to use XFA's in #16095, we should maybe look at a desired "end state". I hoped that we could move them to their respective modules. Still it would be nice to have all shell commands individually optional. I'd merge this PR as an improvement but it hard clashes with #16095 where XFA was supposed to reduce clashes... It might just work (wait for #16095, then use this PR) if we move the current ifdefs from "shell_commands.c" into the respective .c files, without ifdef, and let the pseudomodule sort out what commands to build? |
|
@jnohlgard does that make sense to you? |
|
Not sure I understand the whole picture. Do you mean that we use the makefile changes from this PR and move each of the (currently conditionally compiled) array element definitions into separate XFA fragments inside each |
Yes! |
|
ping @kaspar030 @jnohlgard |
|
@jnohlgard, @kaspar030, ping again. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Contribution description
Rewrite sys/shell/commands/Makefile to provide a submodule for each shell command and use those modules in the command list. This improves user experience by allowing us to see which shell command modules are compiled in via
make info-modulesetc. and makes shell_commands less "special" and more like other modules with submodules, such as ztimer.The introduced Makefile.dep should keep the existing behaviour of adding shell commands automatically based on which modules are enabled in the build.
Testing procedure
Check that shell commands still exist and can be run from the shell in all examples and tests.
Issues/PRs references