All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: do not suppress Kconfig prompts for silent build
@ 2021-07-14  4:23 Masahiro Yamada
  2021-07-18 13:22 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2021-07-14  4:23 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Tetsuo Handa, Michal Marek, linux-kernel

When a new CONFIG option is available, Kbuild shows a prompt to get
the user input.

  $ make
  [ snip ]
  Core Scheduling for SMT (SCHED_CORE) [N/y/?] (NEW)

This is the only interactive place during the build process.

Commit 174a1dcc9642 ("kbuild: sink stdout from cmd for silent build")
suppressed Kconfig prompts as well because syncconfig is invoked by
the 'cmd' macro. You cannot notice the fact that Kconfig is waiting
for the user input.

Use 'kecho' to show the equivalent short log without suppressing stdout
from sub-make.

Fixes: 174a1dcc9642 ("kbuild: sink stdout from cmd for silent build")
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

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

diff --git a/Makefile b/Makefile
index c3f9bd191b89..6272126abe23 100644
--- a/Makefile
+++ b/Makefile
@@ -728,11 +728,9 @@ $(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)
-	+$(call cmd,syncconfig)
+	$(Q)$(kecho) "  SYNC    $@"
+	$(Q)$(MAKE) -f $(srctree)/Makefile 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.
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: do not suppress Kconfig prompts for silent build
  2021-07-14  4:23 [PATCH] kbuild: do not suppress Kconfig prompts for silent build Masahiro Yamada
@ 2021-07-18 13:22 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2021-07-18 13:22 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Tetsuo Handa, Michal Marek, Linux Kernel Mailing List

On Wed, Jul 14, 2021 at 1:24 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> When a new CONFIG option is available, Kbuild shows a prompt to get
> the user input.
>
>   $ make
>   [ snip ]
>   Core Scheduling for SMT (SCHED_CORE) [N/y/?] (NEW)
>
> This is the only interactive place during the build process.
>
> Commit 174a1dcc9642 ("kbuild: sink stdout from cmd for silent build")
> suppressed Kconfig prompts as well because syncconfig is invoked by
> the 'cmd' macro. You cannot notice the fact that Kconfig is waiting
> for the user input.
>
> Use 'kecho' to show the equivalent short log without suppressing stdout
> from sub-make.
>
> Fixes: 174a1dcc9642 ("kbuild: sink stdout from cmd for silent build")
> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---

Applied to linux-kbuild.



>  Makefile | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c3f9bd191b89..6272126abe23 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -728,11 +728,9 @@ $(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)
> -       +$(call cmd,syncconfig)
> +       $(Q)$(kecho) "  SYNC    $@"
> +       $(Q)$(MAKE) -f $(srctree)/Makefile 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.
> --
> 2.27.0
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-18 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14  4:23 [PATCH] kbuild: do not suppress Kconfig prompts for silent build Masahiro Yamada
2021-07-18 13:22 ` Masahiro Yamada

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.