From: Masahiro Yamada <masahiroy@kernel.org>
Date: Sat, 27 Feb 2021 06:26:20 +0000 (+0900)
Subject: kbuild: make -s option take precedence over V=1
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2214945422c143f8bb27faed77a97f728c0a1cb1;p=users%2Fhch%2Fblock.git

kbuild: make -s option take precedence over V=1

'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>
---

diff --git a/Makefile b/Makefile
index f2dc2f953e23..65355c933760 100644
--- 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