All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kbuild: hide commands to run Kconfig, and show short log for syncconfig
Date: Wed, 26 Aug 2020 22:45:47 +0900	[thread overview]
Message-ID: <CAK7LNASkc_LVJ1dvzn3aETgKkrkqNt8hOpjBF0Pn2gh40gJYEw@mail.gmail.com> (raw)
In-Reply-To: <20200821024358.616384-1-masahiroy@kernel.org>

On Fri, Aug 21, 2020 at 11:44 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Some targets (localyesconfig, localmodconfig, defconfig) hide the
> command running, but the others do not.
>
> Users know which Kconfig flavor they are running, so it is OK to hide
> the command. Add $(Q) to all commands consistently. If you want to see
> the full command running, pass V=1 from the command line.
>
> syncconfig is the exceptional case, which occurs without explicit
> command invocation by the user. Display the Kbuild-style log for it.
> The ugly bare log will go away.
>
> [Before]
>
> scripts/kconfig/conf  --syncconfig Kconfig
>
> [After]
>
>   SYNC    include/config/auto.conf
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>


Applied to linux-kbuild.



> ---
>
>  Makefile                 |  5 ++++-
>  scripts/kconfig/Makefile | 16 ++++++++--------
>  2 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9cac6fde3479..0693314d51c3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -708,8 +708,11 @@ $(KCONFIG_CONFIG):
>  # This exploits the 'multi-target pattern rule' trick.
>  # The syncconfig should be executed only once to make all the targets.
>  # (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
> +quiet_cmd_syncconfig = SYNC    $@
> +      cmd_syncconfig = $(MAKE) -f $(srctree)/Makefile syncconfig
> +
>  %/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG)
> -       $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
> +       +$(call cmd,syncconfig)
>  else # !may-sync-config
>  # External modules and some install targets need include/generated/autoconf.h
>  # and include/config/auto.conf but do not care if they are up-to-date.
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index 52b59bf9efe4..e46df0a2d4f9 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -20,19 +20,19 @@ endif
>  unexport CONFIG_
>
>  xconfig: $(obj)/qconf
> -       $< $(silent) $(Kconfig)
> +       $(Q)$< $(silent) $(Kconfig)
>
>  gconfig: $(obj)/gconf
> -       $< $(silent) $(Kconfig)
> +       $(Q)$< $(silent) $(Kconfig)
>
>  menuconfig: $(obj)/mconf
> -       $< $(silent) $(Kconfig)
> +       $(Q)$< $(silent) $(Kconfig)
>
>  config: $(obj)/conf
> -       $< $(silent) --oldaskconfig $(Kconfig)
> +       $(Q)$< $(silent) --oldaskconfig $(Kconfig)
>
>  nconfig: $(obj)/nconf
> -       $< $(silent) $(Kconfig)
> +       $(Q)$< $(silent) $(Kconfig)
>
>  build_menuconfig: $(obj)/mconf
>
> @@ -68,12 +68,12 @@ simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
>  PHONY += $(simple-targets)
>
>  $(simple-targets): $(obj)/conf
> -       $< $(silent) --$@ $(Kconfig)
> +       $(Q)$< $(silent) --$@ $(Kconfig)
>
>  PHONY += savedefconfig defconfig
>
>  savedefconfig: $(obj)/conf
> -       $< $(silent) --$@=defconfig $(Kconfig)
> +       $(Q)$< $(silent) --$@=defconfig $(Kconfig)
>
>  defconfig: $(obj)/conf
>  ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
> @@ -111,7 +111,7 @@ tinyconfig:
>  # CHECK: -o cache_dir=<path> working?
>  PHONY += testconfig
>  testconfig: $(obj)/conf
> -       $(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \
> +       $(Q)$(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \
>         -o cache_dir=$(abspath $(obj)/tests/.cache) \
>         $(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no)
>  clean-files += tests/.cache
> --
> 2.25.1
>


-- 
Best Regards
Masahiro Yamada

      reply	other threads:[~2020-08-26 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  2:43 [PATCH] kbuild: hide commands to run Kconfig, and show short log for syncconfig Masahiro Yamada
2020-08-26 13:45 ` Masahiro Yamada [this message]

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=CAK7LNASkc_LVJ1dvzn3aETgKkrkqNt8hOpjBF0Pn2gh40gJYEw@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@redhat.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.