All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <n.schier@avm.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v2 2/2] kbuild: respect GNU Make -w flag
Date: Mon, 19 Jun 2023 14:51:00 +0200	[thread overview]
Message-ID: <ZJBPNBrLSX+M2e4l@buildd.core.avm.de> (raw)
In-Reply-To: <20230616145751.945864-2-masahiroy@kernel.org>

On Fri, Jun 16, 2023 at 11:57:51PM +0900, Masahiro Yamada wrote:
> Currently, -w (--print-directory) option is ignored, but it is better
> to respect the user's choice.
> 
> This commit changes the behavior of "Entering directory ..." logging.
> 
> If -w (or --print-directory) is given via the command line or the
> MAKEFLAGS environment variable, print "Entering directory ..." for every
> sub make.
> 
> If --no-print-directory is given via the command line or the MAKEFLAGS
> environment variable, suppress "Entering directory ..." completely.
> 
> If none of them is given, print "Entering directory ..." only when Kbuild
> changes the working directory. (default)
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---

Tested-by: Nicolas Schier <n.schier@avm.de>

> 
> Changes in v2:
>   - new patch
> 
>  Makefile | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 916c1a7984b0..3867cdc3de5d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -38,6 +38,12 @@ __all:
>  # descending is started. They are now explicitly listed as the
>  # prepare rule.
>  
> +ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> +short-opts := $(firstword -$(MAKEFLAGS))
> +else
> +short-opts := $(filter-out --%,$(MAKEFLAGS))
> +endif
> +
>  ifneq ($(sub_make_done),1)
>  
>  # Do not use make's built-in rules and variables
> @@ -91,12 +97,6 @@ endif
>  # commands
>  # make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
>  
> -ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> -short-opts := $(firstword -$(MAKEFLAGS))
> -else
> -short-opts := $(filter-out --%,$(MAKEFLAGS))
> -endif
> -
>  ifneq ($(findstring s,$(short-opts)),)
>  quiet=silent_
>  override KBUILD_VERBOSE :=
> @@ -217,12 +217,16 @@ else
>  need-sub-make := 1
>  endif
>  
> +ifeq ($(findstring w, $(short-opts)),)
>  ifeq ($(filter --no-print-directory, $(MAKEFLAGS)),)
>  # If --no-print-directory is unset, recurse once again to set it.
>  # You may end up with recursing into __sub-make twice. This is due to the
>  # behavior change for GNU Make 4.4.1.
>  need-sub-make := 1
>  endif
> +else
> +no-print-directory :=
> +endif
>  
>  ifeq ($(need-sub-make),1)
>  
> -- 
> 2.39.2
> 

  reply	other threads:[~2023-06-19 12:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 14:57 [PATCH v2 1/2] kbuild: revive "Entering directory" for Make >= 4.4.1 Masahiro Yamada
2023-06-16 14:57 ` [PATCH v2 2/2] kbuild: respect GNU Make -w flag Masahiro Yamada
2023-06-19 12:51   ` Nicolas Schier [this message]
2023-06-19 12:50 ` [PATCH v2 1/2] kbuild: revive "Entering directory" for Make >= 4.4.1 Nicolas Schier
2023-06-25  8:03 ` Masahiro Yamada

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=ZJBPNBrLSX+M2e4l@buildd.core.avm.de \
    --to=n.schier@avm.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.