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>
This commit is contained in:
parent
2241ab53cb
commit
fc5d57a9a4
6
Makefile
6
Makefile
|
@ -100,12 +100,12 @@ endif
|
||||||
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
|
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
|
||||||
|
|
||||||
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
|
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
|
||||||
silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
|
short-opts := $(firstword -$(MAKEFLAGS))
|
||||||
else
|
else
|
||||||
silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
|
short-opts := $(filter-out --%,$(MAKEFLAGS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(silence),s)
|
ifneq ($(findstring s,$(short-opts)),)
|
||||||
quiet=silent_
|
quiet=silent_
|
||||||
KBUILD_VERBOSE = 0
|
KBUILD_VERBOSE = 0
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue