Skip to content

Commit

Permalink
kbuild: refactor silent mode detection
Browse files Browse the repository at this point in the history
Factor out $(findstring s,...).

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
  • Loading branch information
masahir0y committed Jan 22, 2023
1 parent 2241ab5 commit fc5d57a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc5d57a

Please sign in to comment.