All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] support/scripts/mkmakefile: Silent wrapper
@ 2018-10-26 11:26 Serj Kalichev
  2018-11-01 20:44 ` Yann E. MORIN
  2018-11-02 11:29 ` [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default Serj Kalichev
  0 siblings, 2 replies; 7+ messages in thread
From: Serj Kalichev @ 2018-10-26 11:26 UTC (permalink / raw)
  To: buildroot

 Suppose we use Makefile wrapper and build
 project out of buildroot tree (with O=...). The commands like "make
 busybox-all-external-deps" will output the string "uname 022 && make ..." to
 stdout before the usefull information. It pollutes stdout. In the same time
 if we use the same command in the buildroot source-tree then we don't get the
 additional output. Some external scripts can analyze output of make and
 additional output can break them. This patch make wrapper silent.
 
 Sorry for the previous ugly-formatted patch.

Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
---
 support/scripts/mkmakefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile
index 37162a3173..3b1a9f8774 100755
--- a/support/scripts/mkmakefile
+++ b/support/scripts/mkmakefile
@@ -33,7 +33,7 @@ MAKEFLAGS += --no-print-directory
 all	:= \$(filter-out Makefile,\$(MAKECMDGOALS))
 
 _all:
-	umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
+	@umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
-- 
2.17.1

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

* [Buildroot] [PATCH 1/1] support/scripts/mkmakefile: Silent wrapper
  2018-10-26 11:26 [Buildroot] [PATCH 1/1] support/scripts/mkmakefile: Silent wrapper Serj Kalichev
@ 2018-11-01 20:44 ` Yann E. MORIN
  2018-11-02 11:36   ` Serj Kalichev
  2018-11-02 11:29 ` [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default Serj Kalichev
  1 sibling, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2018-11-01 20:44 UTC (permalink / raw)
  To: buildroot

Serj, All,

On 2018-10-26 14:26 +0300, Serj Kalichev spake thusly:
>  Suppose we use Makefile wrapper and build
>  project out of buildroot tree (with O=...). The commands like "make
>  busybox-all-external-deps" will output the string "uname 022 && make ..." to
>  stdout before the usefull information. It pollutes stdout. In the same time
>  if we use the same command in the buildroot source-tree then we don't get the
>  additional output. Some external scripts can analyze output of make and
>  additional output can break them. This patch make wrapper silent.
>  
>  Sorry for the previous ugly-formatted patch.

Do not put personal messages like that in the commit log. You may put
them after the three-dash line...

> Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
> ---

... here.

>  support/scripts/mkmakefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile
> index 37162a3173..3b1a9f8774 100755
> --- a/support/scripts/mkmakefile
> +++ b/support/scripts/mkmakefile
> @@ -33,7 +33,7 @@ MAKEFLAGS += --no-print-directory
>  all	:= \$(filter-out Makefile,\$(MAKECMDGOALS))
>  
>  _all:
> -	umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
> +	@umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)

I actually prefer when I can see the path of Buildroot. Since I can use
many Buildroot trees to do tests, I do want to check that I am indeed
using the correct one.

However, I understand that it is weird that the in-tree and out-of-tree
do not print the same stuff, and that can be confusing.

After discussing this on IRC with Thomas, we think it would be nice if
we could mimick what the kernel currently does:
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mkmakefile

The default would be to be silent (what you expect), while still
allowing people like me to turn on the verbose mode when needed.

Care to look into that, please?

In the mean time, I've marked your patch as "changes requested" in
patchwork. Thanks!

Regards,
Yann E. MORIN.

>  Makefile:;
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default
  2018-10-26 11:26 [Buildroot] [PATCH 1/1] support/scripts/mkmakefile: Silent wrapper Serj Kalichev
  2018-11-01 20:44 ` Yann E. MORIN
@ 2018-11-02 11:29 ` Serj Kalichev
  2018-11-02 14:20   ` Yann E. MORIN
                     ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Serj Kalichev @ 2018-11-02 11:29 UTC (permalink / raw)
  To: buildroot

Suppose we use Makefile wrapper and build some
project out of buildroot tree (O=...). The commands like "make
busybox-all-external-deps" will output the string "uname 022 && make ..." to
stdout before the usefull information. It pollutes stdout. In the same time
if we use the same command in the buildroot source-tree then we don't get the
additional output. This patch makes wrapper silent by default. People who
prefer to see more verbose output can use V=1.

Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
---
 support/scripts/mkmakefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile
index 37162a3173..c7569f2ca5 100755
--- a/support/scripts/mkmakefile
+++ b/support/scripts/mkmakefile
@@ -20,6 +20,13 @@ echo "  GEN     $2/Makefile"
 cat << EOF > $2/Makefile
 # Automatically generated by $0: don't edit
 
+ifeq ("\$(origin V)", "command line")
+VERBOSE := \$(V)
+endif
+ifneq (\$(VERBOSE),1)
+Q := @
+endif
+
 lastword = \$(word \$(words \$(1)),\$(1))
 makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
 
@@ -33,7 +40,7 @@ MAKEFLAGS += --no-print-directory
 all	:= \$(filter-out Makefile,\$(MAKECMDGOALS))
 
 _all:
-	umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
+	\$(Q)umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
 
 Makefile:;
 
-- 
2.17.1

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

* [Buildroot] [PATCH 1/1] support/scripts/mkmakefile: Silent wrapper
  2018-11-01 20:44 ` Yann E. MORIN
@ 2018-11-02 11:36   ` Serj Kalichev
  0 siblings, 0 replies; 7+ messages in thread
From: Serj Kalichev @ 2018-11-02 11:36 UTC (permalink / raw)
  To: buildroot

01.11.2018 23:44, Yann E. MORIN ?????:
> The default would be to be silent (what you expect), while still
> allowing people like me to turn on the verbose mode when needed.
>
Yes, it's better solution. I have changed the patch. See patch v2

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

* [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default
  2018-11-02 11:29 ` [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default Serj Kalichev
@ 2018-11-02 14:20   ` Yann E. MORIN
  2018-11-02 20:29   ` Thomas Petazzoni
  2018-11-14 22:26   ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2018-11-02 14:20 UTC (permalink / raw)
  To: buildroot

Serj, All,

On 2018-11-02 14:29 +0300, Serj Kalichev spake thusly:
> Suppose we use Makefile wrapper and build some
> project out of buildroot tree (O=...). The commands like "make
> busybox-all-external-deps" will output the string "uname 022 && make ..." to
> stdout before the usefull information. It pollutes stdout. In the same time
> if we use the same command in the buildroot source-tree then we don't get the
> additional output. This patch makes wrapper silent by default. People who
> prefer to see more verbose output can use V=1.
> 
> Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  support/scripts/mkmakefile | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile
> index 37162a3173..c7569f2ca5 100755
> --- a/support/scripts/mkmakefile
> +++ b/support/scripts/mkmakefile
> @@ -20,6 +20,13 @@ echo "  GEN     $2/Makefile"
>  cat << EOF > $2/Makefile
>  # Automatically generated by $0: don't edit
>  
> +ifeq ("\$(origin V)", "command line")
> +VERBOSE := \$(V)
> +endif
> +ifneq (\$(VERBOSE),1)
> +Q := @
> +endif
> +
>  lastword = \$(word \$(words \$(1)),\$(1))
>  makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
>  
> @@ -33,7 +40,7 @@ MAKEFLAGS += --no-print-directory
>  all	:= \$(filter-out Makefile,\$(MAKECMDGOALS))
>  
>  _all:
> -	umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
> +	\$(Q)umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all)
>  
>  Makefile:;
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default
  2018-11-02 11:29 ` [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default Serj Kalichev
  2018-11-02 14:20   ` Yann E. MORIN
@ 2018-11-02 20:29   ` Thomas Petazzoni
  2018-11-14 22:26   ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2018-11-02 20:29 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  2 Nov 2018 14:29:33 +0300, Serj Kalichev wrote:
> Suppose we use Makefile wrapper and build some
> project out of buildroot tree (O=...). The commands like "make
> busybox-all-external-deps" will output the string "uname 022 && make ..." to
> stdout before the usefull information. It pollutes stdout. In the same time
> if we use the same command in the buildroot source-tree then we don't get the
> additional output. This patch makes wrapper silent by default. People who
> prefer to see more verbose output can use V=1.
> 
> Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
> ---
>  support/scripts/mkmakefile | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default
  2018-11-02 11:29 ` [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default Serj Kalichev
  2018-11-02 14:20   ` Yann E. MORIN
  2018-11-02 20:29   ` Thomas Petazzoni
@ 2018-11-14 22:26   ` Peter Korsgaard
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2018-11-14 22:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Serj" == Serj Kalichev <serj.kalichev@gmail.com> writes:

 > Suppose we use Makefile wrapper and build some
 > project out of buildroot tree (O=...). The commands like "make
 > busybox-all-external-deps" will output the string "uname 022 && make ..." to
 > stdout before the usefull information. It pollutes stdout. In the same time
 > if we use the same command in the buildroot source-tree then we don't get the
 > additional output. This patch makes wrapper silent by default. People who
 > prefer to see more verbose output can use V=1.

 > Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>

Committed to 2018.02.x and 2018.08.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2018-11-14 22:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 11:26 [Buildroot] [PATCH 1/1] support/scripts/mkmakefile: Silent wrapper Serj Kalichev
2018-11-01 20:44 ` Yann E. MORIN
2018-11-02 11:36   ` Serj Kalichev
2018-11-02 11:29 ` [Buildroot] [PATCH v2 1/1] support/scripts/mkmakefile: Wrapper is silent by default Serj Kalichev
2018-11-02 14:20   ` Yann E. MORIN
2018-11-02 20:29   ` Thomas Petazzoni
2018-11-14 22:26   ` Peter Korsgaard

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.