public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nicolas Schier <nicolas@fjasle.eu>
Subject: [PATCH 1/5] kbuild: refactor silent mode detection
Date: Fri, 23 Dec 2022 01:25:31 +0900	[thread overview]
Message-ID: <20221222162535.1578462-1-masahiroy@kernel.org> (raw)

Factor out $(findstring s,...).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 25247f931872..e8ce3e2b30d6 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
-- 
2.34.1


             reply	other threads:[~2022-12-22 16:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 16:25 Masahiro Yamada [this message]
2022-12-22 16:25 ` [PATCH 2/5] kbuild: print short log in addition to the whole command with V=1 Masahiro Yamada
2022-12-23 11:23   ` Nicolas Schier
2022-12-22 16:25 ` [PATCH 3/5] kbuild: do not print extra logs for V=2 Masahiro Yamada
2022-12-23 11:23   ` Nicolas Schier
2022-12-22 16:25 ` [PATCH 4/5] kbuild: allow to combine multiple V= levels Masahiro Yamada
2022-12-23 11:23   ` Nicolas Schier
2022-12-22 16:25 ` [PATCH 5/5] kbuild: drop V=0 support Masahiro Yamada
2022-12-23 11:24   ` Nicolas Schier
2022-12-22 17:51 ` [PATCH 1/5] kbuild: refactor silent mode detection Nick Desaulniers
2022-12-23 11:23 ` Nicolas Schier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221222162535.1578462-1-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox