kbuild: rust: remove -v option of scripts/rust_is_available.sh
PATCH 1/1 kbuild: rust: remove -v option of scripts/rust_is_available.sh
The -v option is passed when this scripts is invoked from Makefile, but not when invoked from Kconfig.
As you can see in scripts/Kconfig.include, the 'success' macro suppresses stdout and stderr anyway, so this script does not need to be quiet.
---
Makefile | 4 +- scripts/rust_is_available.sh | 94 +++++++++++++++--------------------- 2 files changed, 42 insertions(+), 56 deletions(-)
Makefile +2 -2
@@ -1280,7 +1280,7 @@ prepare0: archprepare # All the preparing.. prepare: prepare0 ifdef CONFIG_RUST - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh -v + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh $(Q)$(MAKE) $(build)=rust endif
@@ -1806,7 +1806,7 @@ $(DOC_TARGETS): # "Is Rust available?" target PHONY += rustavailable rustavailable: - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh -v && echo "Rust is available!" + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/rust_is_available.sh && echo "Rust is available!" # Documentation target #
scripts/rust_is_available.sh +40 -54
138 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 2 lines · Masahiro Yamada
The -v option is passed when this scripts is invoked from
Makefile,
scripts -> script
Quoted 4 lines
but not when invoked from
Kconfig.As you can see in
scripts/Kconfig.include, the 'success' macro suppresses stdout and stderr anyway, so this script does not need to be quiet.
Yeah, let's get rid of the complexity. The script originally was intended to be usable independently of the Makefile, but in the end we don't really use it like that.
In fact, now we should probably add a warning/error if somebody calls it directly (and/or set defaults for the variables). I can send a patch for that on top of this one.
There is a small functional change, in that we will be making an unneeded call to cc-version.sh and another to $CC for the Kconfig case (i.e. the previously non-verbose case), but that seems like a fine price for the simplicity.
scripts/rust_is_available.sh
Quoted 2 lines
scripts/rust_is_available.sh +0
-0
Could you please remove the comment at the top? i.e.:
#
# Pass -v for human output and more checks (as warnings).
With that:
If you want me to take it, please let me know.
Cheers,
Miguel