]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kbuild: refactor silent mode detection
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 22 Dec 2022 16:25:31 +0000 (01:25 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 22 Jan 2023 14:43:32 +0000 (23:43 +0900)
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>
Makefile

index c1ead4cd2342a03197e4fdd6a2545abc0dc5b9fd..e2dbaab2f802d9910b573c27e33198a823f1b09c 100644 (file)
--- 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