aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-12-23 01:25:31 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-01-22 23:43:32 +0900
commitfc5d57a9a4fe3e3662c4ec4e84772dcea64979ca (patch)
treef617fc40606626edcd96f1c9586b7a2a9ec874ad /Makefile
parent2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff)
downloadlinux-fc5d57a9a4fe3e3662c4ec4e84772dcea64979ca.tar.gz
kbuild: refactor silent mode detection
Factor out $(findstring s,...). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c1ead4cd2342a0..e2dbaab2f802d9 100644
--- a/Makefile
+++ b/Makefile
@@ -100,12 +100,12 @@ endif
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
-silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
+short-opts := $(firstword -$(MAKEFLAGS))
else
-silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
+short-opts := $(filter-out --%,$(MAKEFLAGS))
endif
-ifeq ($(silence),s)
+ifneq ($(findstring s,$(short-opts)),)
quiet=silent_
KBUILD_VERBOSE = 0
endif