kbuild: make -s option take precedence over V=1
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 27 Feb 2021 06:26:20 +0000 (15:26 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 28 Feb 2021 06:22:02 +0000 (15:22 +0900)
'make -s' should be really silent. However, 'make -s V=1' prints noisy
log messages from some shell scripts.

Of course, such a combination is odd, but the build system needs to do
the right thing even if a user gives strange input.

If -s is given, KBUILD_VERBOSE should be forced to 0.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile

index f2dc2f953e23e43296ecefd6e9540ce6651f938d..65355c933760f6af130cb6a73c48d9de6b0a86d5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -96,6 +96,7 @@ endif
 
 ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
   quiet=silent_
+  KBUILD_VERBOSE = 0
 endif
 
 export quiet Q KBUILD_VERBOSE