linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: hide error checker logs for V=1 builds
@ 2022-09-24  8:24 Masahiro Yamada
  2022-09-26 21:44 ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2022-09-24  8:24 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Michal Marek, Nick Desaulniers

V=1 (verbose build) shows commands executed by Make, but it may cause
misunderstanding.

For example, the following command shows the outstanding error message.

  $ make V=1 INSTALL_PATH=/tmp install
  test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
  echo >&2;                                                       \
  echo >&2 "  ERROR: Kernel configuration is invalid.";           \
  echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
  echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
  echo >&2 ;                                                      \
  /bin/false)
    unset sub_make_done; ./scripts/install.sh

It is not an error. Make just showed the recipe lines it has executed,
but people may think that 'make install' has failed.

Likewise, the combination of V=1 and O= shows confusing
"*** The source tree is not clean, please run 'make mrproper'".

Suppress such misleading logs.

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

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

diff --git a/Makefile b/Makefile
index a5e9d9388649..833052fcf48a 100644
--- a/Makefile
+++ b/Makefile
@@ -583,7 +583,7 @@ quiet_cmd_makefile = GEN     Makefile
 	} > Makefile
 
 outputmakefile:
-	$(Q)if [ -f $(srctree)/.config -o \
+	@if [ -f $(srctree)/.config -o \
 		 -d $(srctree)/include/config -o \
 		 -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
 		echo >&2 "***"; \
@@ -739,7 +739,7 @@ else # !may-sync-config
 PHONY += include/config/auto.conf
 
 include/config/auto.conf:
-	$(Q)test -e include/generated/autoconf.h -a -e $@ || (		\
+	@test -e include/generated/autoconf.h -a -e $@ || (		\
 	echo >&2;							\
 	echo >&2 "  ERROR: Kernel configuration is invalid.";		\
 	echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
-- 
2.34.1


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

* Re: [PATCH] kbuild: hide error checker logs for V=1 builds
  2022-09-24  8:24 [PATCH] kbuild: hide error checker logs for V=1 builds Masahiro Yamada
@ 2022-09-26 21:44 ` Nick Desaulniers
  2022-09-28 18:46   ` Nicolas Schier
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2022-09-26 21:44 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel, Michal Marek

On Sat, Sep 24, 2022 at 1:25 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> V=1 (verbose build) shows commands executed by Make, but it may cause
> misunderstanding.
>
> For example, the following command shows the outstanding error message.
>
>   $ make V=1 INSTALL_PATH=/tmp install
>   test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
>   echo >&2;                                                       \
>   echo >&2 "  ERROR: Kernel configuration is invalid.";           \
>   echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
>   echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
>   echo >&2 ;                                                      \
>   /bin/false)
>     unset sub_make_done; ./scripts/install.sh
>
> It is not an error. Make just showed the recipe lines it has executed,
> but people may think that 'make install' has failed.
>
> Likewise, the combination of V=1 and O= shows confusing
> "*** The source tree is not clean, please run 'make mrproper'".
>
> Suppress such misleading logs.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a5e9d9388649..833052fcf48a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -583,7 +583,7 @@ quiet_cmd_makefile = GEN     Makefile
>         } > Makefile
>
>  outputmakefile:
> -       $(Q)if [ -f $(srctree)/.config -o \
> +       @if [ -f $(srctree)/.config -o \
>                  -d $(srctree)/include/config -o \
>                  -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
>                 echo >&2 "***"; \
> @@ -739,7 +739,7 @@ else # !may-sync-config
>  PHONY += include/config/auto.conf
>
>  include/config/auto.conf:
> -       $(Q)test -e include/generated/autoconf.h -a -e $@ || (          \
> +       @test -e include/generated/autoconf.h -a -e $@ || (             \
>         echo >&2;                                                       \
>         echo >&2 "  ERROR: Kernel configuration is invalid.";           \
>         echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
> --
> 2.34.1
>


-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] kbuild: hide error checker logs for V=1 builds
  2022-09-26 21:44 ` Nick Desaulniers
@ 2022-09-28 18:46   ` Nicolas Schier
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Schier @ 2022-09-28 18:46 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Masahiro Yamada, linux-kbuild, linux-kernel, Michal Marek

[-- Attachment #1: Type: text/plain, Size: 2874 bytes --]

On Mon, 26 Sep 2022 14:44:46 -0700 Nick Desaulniers wrote:
> On Sat, Sep 24, 2022 at 1:25 AM Masahiro Yamada 
> <masahiroy@kernel.org> wrote:
> >
> > V=1 (verbose build) shows commands executed by Make, but it may cause
> > misunderstanding.
> >
> > For example, the following command shows the outstanding error message.
> >
> >   $ make V=1 INSTALL_PATH=/tmp install
> >   test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
> >   echo >&2;                                                       \
> >   echo >&2 "  ERROR: Kernel configuration is invalid.";           \
> >   echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
> >   echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
> >   echo >&2 ;                                                      \
> >   /bin/false)
> >     unset sub_make_done; ./scripts/install.sh
> >
> > It is not an error. Make just showed the recipe lines it has executed,
> > but people may think that 'make install' has failed.
> >
> > Likewise, the combination of V=1 and O= shows confusing
> > "*** The source tree is not clean, please run 'make mrproper'".
> >
> > Suppress such misleading logs.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> 
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

oh yes, thanks for that patch!

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

> > ---
> >
> >  Makefile | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index a5e9d9388649..833052fcf48a 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -583,7 +583,7 @@ quiet_cmd_makefile = GEN     Makefile
> >         } > Makefile
> >
> >  outputmakefile:
> > -       $(Q)if [ -f $(srctree)/.config -o \
> > +       @if [ -f $(srctree)/.config -o \
> >                  -d $(srctree)/include/config -o \
> >                  -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
> >                 echo >&2 "***"; \
> > @@ -739,7 +739,7 @@ else # !may-sync-config
> >  PHONY += include/config/auto.conf
> >
> >  include/config/auto.conf:
> > -       $(Q)test -e include/generated/autoconf.h -a -e $@ || (          \
> > +       @test -e include/generated/autoconf.h -a -e $@ || (             \
> >         echo >&2;                                                       \
> >         echo >&2 "  ERROR: Kernel configuration is invalid.";           \
> >         echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
> > --
> > 2.34.1
> >
> 
> 
> -- 
> Thanks,
> ~Nick Desaulniers

-- 
epost|xmpp: nicolas@fjasle.eu          irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
     -- frykten for herren er opphav til kunnskap --

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2022-09-28 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24  8:24 [PATCH] kbuild: hide error checker logs for V=1 builds Masahiro Yamada
2022-09-26 21:44 ` Nick Desaulniers
2022-09-28 18:46   ` Nicolas Schier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).