summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-12-22 19:25:34 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2023-01-22 17:43:32 +0300
commit6ae4b9868a8f723cae2600722eea033fafadd399 (patch)
tree2da4dfacfb2dca92750831bfbd8db067b17decad /Makefile
parentc0d3b83100c896e1b0909023df58a0ebdd428d61 (diff)
downloadlinux-6ae4b9868a8f723cae2600722eea033fafadd399.tar.xz
kbuild: allow to combine multiple V= levels
Commit a6de553da01c ("kbuild: Allow to combine multiple W= levels") supported W=123 to enable all the extra warning groups. I think a similar idea is applicable to the V= option. V=1 echos the whole command V=2 prints the reason for rebuilding These are orthogonal, and can be enabled at the same time. This commit supports V=12 to enable both of them. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 9a919428a726..ed5ce58196be 100644
--- a/Makefile
+++ b/Makefile
@@ -69,9 +69,8 @@ unexport GREP_OPTIONS
#
# $(Q)$(MAKE) $(build)=scripts/basic
#
-# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
-# If KBUILD_VERBOSE equals 1 then the above command is displayed.
-# If KBUILD_VERBOSE equals 2 then give the reason why each target is rebuilt.
+# If KBUILD_VERBOSE contains 1, the whole command is echoed.
+# If KBUILD_VERBOSE contains 2, the reason for rebuilding is printed.
#
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
@@ -83,12 +82,12 @@ ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
-ifeq ($(KBUILD_VERBOSE),1)
+quiet = quiet_
+Q = @
+
+ifneq ($(findstring 1, $(KBUILD_VERBOSE)),)
quiet =
Q =
-else
- quiet=quiet_
- Q = @
endif
# If the user is running make -s (silent mode), suppress echoing of
@@ -1775,8 +1774,9 @@ help:
printf " %-16s - Show all of the above\\n" help-boards; \
echo '')
- @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
- @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
+ @echo ' make V=n [targets] 0: quiet build (default), 1: verbose build'
+ @echo ' 2: give reason for rebuild of target'
+ @echo ' V=1 and V=2 can be combined with V=12'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
@echo ' make C=1 [targets] Check re-compiled c source with $$CHECK'
@echo ' (sparse by default)'