From: Masahiro Yamada Date: Thu, 22 Dec 2022 16:25:31 +0000 (+0900) Subject: kbuild: refactor silent mode detection X-Git-Tag: v6.6.17~5418^2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc5d57a9a4fe3e3662c4ec4e84772dcea64979ca;p=platform%2Fkernel%2Flinux-rpi.git kbuild: refactor silent mode detection Factor out $(findstring s,...). Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Reviewed-by: Nicolas Schier --- diff --git a/Makefile b/Makefile index c1ead4c..e2dbaab 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