[XEN PATCH 09/15] build: hide commands run for kconfig

Anthony PERARD posted 15 patches 1 year, 6 months ago
[XEN PATCH 09/15] build: hide commands run for kconfig
Posted by Anthony PERARD 1 year, 6 months ago
but still show a log entry for syncconfig. We have to use kecho
instead of $(cmd,) to avoid issue with prompt from kconfig.

linux commits for reference:
    23cd88c91343 ("kbuild: hide commands to run Kconfig, and show short log for syncconfig")
    d952cfaf0cff ("kbuild: do not suppress Kconfig prompts for silent build")

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Makefile               |  1 +
 xen/tools/kconfig/Makefile | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 4dc960df2c..127c0e40b5 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -382,6 +382,7 @@ $(KCONFIG_CONFIG): tools_fixdep
 # This exploits the 'multi-target pattern rule' trick.
 # The syncconfig should be executed only once to make all the targets.
 include/config/%.conf include/config/%.conf.cmd: $(KCONFIG_CONFIG)
+	$(Q)$(kecho) "  SYNC    $@"
 	$(Q)$(MAKE) $(build)=tools/kconfig syncconfig
 
 ifeq ($(CONFIG_DEBUG),y)
diff --git a/xen/tools/kconfig/Makefile b/xen/tools/kconfig/Makefile
index b7b9a419ad..18c0f5d4f1 100644
--- a/xen/tools/kconfig/Makefile
+++ b/xen/tools/kconfig/Makefile
@@ -24,19 +24,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
 
@@ -70,12 +70,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)),)
-- 
Anthony PERARD
Re: [XEN PATCH 09/15] build: hide commands run for kconfig
Posted by Jan Beulich 1 year, 6 months ago
On 23.05.2023 18:38, Anthony PERARD wrote:
> but still show a log entry for syncconfig. We have to use kecho
> instead of $(cmd,) to avoid issue with prompt from kconfig.

Reading this description I was looking for uses of $(cmd ...) that you
replace. I think this wants wording differently, e.g. "We have to
use kecho, not $(cmd,), to ..."

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -382,6 +382,7 @@ $(KCONFIG_CONFIG): tools_fixdep
>  # This exploits the 'multi-target pattern rule' trick.
>  # The syncconfig should be executed only once to make all the targets.
>  include/config/%.conf include/config/%.conf.cmd: $(KCONFIG_CONFIG)
> +	$(Q)$(kecho) "  SYNC    $@"
>  	$(Q)$(MAKE) $(build)=tools/kconfig syncconfig

The latter of the Linux commits you reference also extends the comment,
to keep people from trying to switch to using $(cmd ...). I think we
should follow suit.

Jan
Re: [XEN PATCH 09/15] build: hide commands run for kconfig
Posted by Luca Fancellu 1 year, 6 months ago

> On 23 May 2023, at 17:38, Anthony PERARD <anthony.perard@citrix.com> wrote:
> 
> but still show a log entry for syncconfig. We have to use kecho
> instead of $(cmd,) to avoid issue with prompt from kconfig.
> 
> linux commits for reference:
>    23cd88c91343 ("kbuild: hide commands to run Kconfig, and show short log for syncconfig")
>    d952cfaf0cff ("kbuild: do not suppress Kconfig prompts for silent build")
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Tested-by: Luca Fancellu <luca.fancellu@arm.com>