All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars
@ 2019-03-12 10:57 Martin Kepplinger
  2019-03-12 12:33 ` Arnout Vandecappelle
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Kepplinger @ 2019-03-12 10:57 UTC (permalink / raw)
  To: buildroot

Add a note about errors we currently have, as discussed in
http://lists.busybox.net/pipermail/buildroot/2019-March/244212.html

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
---
 docs/manual/make-tips.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt
index ea1d825bef..475de4ffa7 100644
--- a/docs/manual/make-tips.txt
+++ b/docs/manual/make-tips.txt
@@ -131,3 +131,13 @@ The output of quoted variables can be reused in shell scripts, for example:
  $ echo $BUSYBOX_DEPENDENCIES
  skeleton toolchain
 ----
+
+Note that when using +make printvars+ you might see spurious errors like
+the following. Please help reviewing our Makefile macros and variables
+in order to fix this:
+
+----
+/bin/bash: support/dependencies/check-host-.sh: no such file or directory
+/bin/bash: -c: line 0: syntax error: ')' unexpected
+/bin/bash: -c: line 0: `set -e; TMP="$(mktemp)"; if () >/dev/null 2>&1; then echo ""; else echo ""; fi;
+----
-- 
2.20.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3616 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190312/e2e0dfb4/attachment.bin>

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

* [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars
  2019-03-12 10:57 [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars Martin Kepplinger
@ 2019-03-12 12:33 ` Arnout Vandecappelle
  2019-03-12 13:14   ` yann.morin at orange.com
  2019-03-12 17:36   ` Yann E. MORIN
  0 siblings, 2 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2019-03-12 12:33 UTC (permalink / raw)
  To: buildroot



On 12/03/2019 11:57, Martin Kepplinger wrote:
> Add a note about errors we currently have, as discussed in
> http://lists.busybox.net/pipermail/buildroot/2019-March/244212.html
> 
> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> ---
>  docs/manual/make-tips.txt | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt
> index ea1d825bef..475de4ffa7 100644
> --- a/docs/manual/make-tips.txt
> +++ b/docs/manual/make-tips.txt
> @@ -131,3 +131,13 @@ The output of quoted variables can be reused in shell scripts, for example:
>   $ echo $BUSYBOX_DEPENDENCIES
>   skeleton toolchain
>  ----
> +
> +Note that when using +make printvars+ you might see spurious errors like
> +the following. Please help reviewing our Makefile macros and variables
> +in order to fix this:

 I thought the conclusion of that thread is that there is no way to fix it? The
only reasonable way is to filter out macros from the .VARS. E.g. defining
PRINTVARS_FILTER and for each macro definition, append to that list.

 However, I'm not even convinced that we really want to do that. It is adding
significant complexity for little gain.

 Instead, I'm more inclined to remove the possibility of running printvars
without explicit VARS=. If you really want, you can still get all variables with
VARS=%.

 Regards,
 Arnout

> +
> +----
> +/bin/bash: support/dependencies/check-host-.sh: no such file or directory
> +/bin/bash: -c: line 0: syntax error: ')' unexpected
> +/bin/bash: -c: line 0: `set -e; TMP="$(mktemp)"; if () >/dev/null 2>&1; then echo ""; else echo ""; fi;
> +----
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

* [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars
  2019-03-12 12:33 ` Arnout Vandecappelle
@ 2019-03-12 13:14   ` yann.morin at orange.com
  2019-03-12 13:53     ` Arnout Vandecappelle
  2019-03-12 17:36   ` Yann E. MORIN
  1 sibling, 1 reply; 11+ messages in thread
From: yann.morin at orange.com @ 2019-03-12 13:14 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-03-12 13:33 +0100, Arnout Vandecappelle spake thusly:
> On 12/03/2019 11:57, Martin Kepplinger wrote:
> > Add a note about errors we currently have, as discussed in
> > http://lists.busybox.net/pipermail/buildroot/2019-March/244212.html
> > 
> > Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> > ---
> >  docs/manual/make-tips.txt | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt
> > index ea1d825bef..475de4ffa7 100644
> > --- a/docs/manual/make-tips.txt
> > +++ b/docs/manual/make-tips.txt
> > @@ -131,3 +131,13 @@ The output of quoted variables can be reused in shell scripts, for example:
> >   $ echo $BUSYBOX_DEPENDENCIES
> >   skeleton toolchain
> >  ----
> > +
> > +Note that when using +make printvars+ you might see spurious errors like
> > +the following. Please help reviewing our Makefile macros and variables
> > +in order to fix this:
> 
>  I thought the conclusion of that thread is that there is no way to fix it? The
> only reasonable way is to filter out macros from the .VARS. E.g. defining
> PRINTVARS_FILTER and for each macro definition, append to that list.
> 
>  However, I'm not even convinced that we really want to do that. It is adding
> significant complexity for little gain.
> 
>  Instead, I'm more inclined to remove the possibility of running printvars
> without explicit VARS=. If you really want, you can still get all variables with
> VARS=%.

I'd like the ability to extract many unrelated variables, but not all of
them either, so maybe we can accept that VARS is a sapce-separated list
of patterns to extract, ?-la:

    make -s printvars VARS="VAR_1 VAR_2 PAT_1_% PAT_2_%"

which would make it faster and more reliable to extract a subset of the
variables, without the need to filter them out of the whole printvars,
nor with the overhead (a few seconds) of calling make for each one.

I think I know someone that will work on that soon. ;-)

Regards,
Yann E. MORIN.

-- 
                                        ____________
.-----------------.--------------------:       _    :------------------.
|  Yann E. MORIN  | Real-Time Embedded |    __/ )   | /"\ ASCII RIBBON |
| +33 534.541.179 | Software  Designer |  _/ - /'   | \ / CAMPAIGN     |
| +33 638.411.245 '--------------------: (_    `--, |  X  AGAINST      |
|      yann.morin (at) orange.com      |_="    ,--' | / \ HTML MAIL    |
'--------------------------------------:______/_____:------------------'


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

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

* [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars
  2019-03-12 13:14   ` yann.morin at orange.com
@ 2019-03-12 13:53     ` Arnout Vandecappelle
  2019-03-12 14:04       ` yann.morin at orange.com
  0 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2019-03-12 13:53 UTC (permalink / raw)
  To: buildroot



On 12/03/2019 14:14, yann.morin at orange.com wrote:
> I'd like the ability to extract many unrelated variables, but not all of
> them either, so maybe we can accept that VARS is a sapce-separated list
> of patterns to extract, ?-la:
> 
>     make -s printvars VARS="VAR_1 VAR_2 PAT_1_% PAT_2_%"

 This has worked ever since we introduced VARS...

 Regards,
 Arnout

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

* [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars
  2019-03-12 13:53     ` Arnout Vandecappelle
@ 2019-03-12 14:04       ` yann.morin at orange.com
  0 siblings, 0 replies; 11+ messages in thread
From: yann.morin at orange.com @ 2019-03-12 14:04 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-03-12 14:53 +0100, Arnout Vandecappelle spake thusly:
> On 12/03/2019 14:14, yann.morin at orange.com wrote:
> > I'd like the ability to extract many unrelated variables, but not all of
> > them either, so maybe we can accept that VARS is a sapce-separated list
> > of patterns to extract, ?-la:
> >     make -s printvars VARS="VAR_1 VAR_2 PAT_1_% PAT_2_%"
>  This has worked ever since we introduced VARS...

Wooo... I did not even try it, I just assumed from the manual that this
was not supported, because we say "the make pattern" (i.e. singular)...

OK, so I know someone that will soon be sending an update to the
manual... ;-)
Thanks!

Regards,
Yann E. MORIN.

-- 
                                        ____________
.-----------------.--------------------:       _    :------------------.
|  Yann E. MORIN  | Real-Time Embedded |    __/ )   | /"\ ASCII RIBBON |
| +33 534.541.179 | Software  Designer |  _/ - /'   | \ / CAMPAIGN     |
| +33 638.411.245 '--------------------: (_    `--, |  X  AGAINST      |
|      yann.morin (at) orange.com      |_="    ,--' | / \ HTML MAIL    |
'--------------------------------------:______/_____:------------------'


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

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

* [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars
  2019-03-12 12:33 ` Arnout Vandecappelle
  2019-03-12 13:14   ` yann.morin at orange.com
@ 2019-03-12 17:36   ` Yann E. MORIN
  2019-03-12 17:55     ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Arnout Vandecappelle
  1 sibling, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2019-03-12 17:36 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-03-12 13:33 +0100, Arnout Vandecappelle spake thusly:
> On 12/03/2019 11:57, Martin Kepplinger wrote:
> > Add a note about errors we currently have, as discussed in
> > http://lists.busybox.net/pipermail/buildroot/2019-March/244212.html
> > 
> > Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
> > ---
> >  docs/manual/make-tips.txt | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt
> > index ea1d825bef..475de4ffa7 100644
> > --- a/docs/manual/make-tips.txt
> > +++ b/docs/manual/make-tips.txt
> > @@ -131,3 +131,13 @@ The output of quoted variables can be reused in shell scripts, for example:
> >   $ echo $BUSYBOX_DEPENDENCIES
> >   skeleton toolchain
> >  ----
> > +
> > +Note that when using +make printvars+ you might see spurious errors like
> > +the following. Please help reviewing our Makefile macros and variables
> > +in order to fix this:
> 
>  I thought the conclusion of that thread is that there is no way to fix it?

Yes, that was my impresion as well. We can document that here may be
spurious error messages, but fixing them is not wanted (because it makes
the code more complex).

> The
> only reasonable way is to filter out macros from the .VARS. E.g. defining
> PRINTVARS_FILTER and for each macro definition, append to that list.
> 
>  However, I'm not even convinced that we really want to do that. It is adding
> significant complexity for little gain.

Agreed.

>  Instead, I'm more inclined to remove the possibility of running printvars
> without explicit VARS=. If you really want, you can still get all variables with
> VARS=%.

Yes, that sounds like a good idea, indeed. +1

Regards,
Yann E. MORIN.

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

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

* [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set
  2019-03-12 17:36   ` Yann E. MORIN
@ 2019-03-12 17:55     ` Arnout Vandecappelle
  2019-03-12 17:55       ` [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars' Arnout Vandecappelle
                         ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2019-03-12 17:55 UTC (permalink / raw)
  To: buildroot

Using 'make printvars' for printing all variables is not very useful.
E.g. all macros will output some bogus value. In addition, the same can
be achieved with 'make -p'.

We can simply remove the condition on $(VARS). If VARS is not set, the
filter expression will be empty which matches nothing, so nothing is
printed.

Note that the old behaviour can still be achieved with:
make printvars VARS=%

Update the 'make help' text to match the new behaviour.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index a64196f9c3..6af8923892 100644
--- a/Makefile
+++ b/Makefile
@@ -1031,7 +1031,7 @@ $(BUILD_DIR)/.br2-external.in: $(BUILD_DIR)
 printvars:
 	@:
 	$(foreach V, \
-		$(sort $(if $(VARS),$(filter $(VARS),$(.VARIABLES)),$(.VARIABLES))), \
+		$(sort $(filter $(VARS),$(.VARIABLES))), \
 		$(if $(filter-out environment% default automatic, \
 				$(origin $V)), \
 		$(if $(QUOTED_VARS),\
@@ -1124,7 +1124,7 @@ help:
 	@echo '  source                 - download all sources needed for offline-build'
 	@echo '  external-deps          - list external packages used'
 	@echo '  legal-info             - generate info about license compliance'
-	@echo '  printvars              - dump all the internal variables'
+	@echo '  printvars              - dump internal variables selected with VARS=...'
 	@echo
 	@echo '  make V=0|1             - 0 => quiet build (default), 1 => verbose build'
 	@echo '  make O=dir             - Locate all output files in "dir", including .config'
-- 
2.20.1

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

* [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars'
  2019-03-12 17:55     ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Arnout Vandecappelle
@ 2019-03-12 17:55       ` Arnout Vandecappelle
  2019-03-12 18:44         ` Yann E. MORIN
  2019-03-12 18:42       ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Yann E. MORIN
  2019-03-12 21:01       ` Thomas Petazzoni
  2 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2019-03-12 17:55 UTC (permalink / raw)
  To: buildroot

Add a 'VARS=...' setting to the example. To make it clear that several
variables can be specified, use two variables in the first example.
Only 2 variables are printed, so the ... is removed.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
---
 docs/manual/make-tips.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt
index ea1d825bef..869b6807dd 100644
--- a/docs/manual/make-tips.txt
+++ b/docs/manual/make-tips.txt
@@ -80,18 +80,18 @@ to xref:ccache[].
 
 .Dumping the internal make variables:
 
-One can dump all the variables known to make, along with their values:
+One can dump the variables known to make, along with their values:
 
 ----
- $ make -s printvars
- VARIABLE=value_of_variable
- ...
+ $ make -s printvars VARS='VARIABLE1 VARIABLE2'
+ VARIABLE1=value_of_variable
+ VARIABLE2=value_of_variable
 ----
 
 It is possible to tweak the output using some variables:
 
 - +VARS+ will limit the listing to variables which names match the
-  specified make-pattern
+  specified make-patterns - this must be set else nothing is printed
 - +QUOTED_VARS+, if set to +YES+, will single-quote the value
 - +RAW_VARS+, if set to +YES+, will print the unexpanded value
 
-- 
2.20.1

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

* [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set
  2019-03-12 17:55     ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Arnout Vandecappelle
  2019-03-12 17:55       ` [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars' Arnout Vandecappelle
@ 2019-03-12 18:42       ` Yann E. MORIN
  2019-03-12 21:01       ` Thomas Petazzoni
  2 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2019-03-12 18:42 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-03-12 18:55 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> Using 'make printvars' for printing all variables is not very useful.
> E.g. all macros will output some bogus value. In addition, the same can
> be achieved with 'make -p'.
> 
> We can simply remove the condition on $(VARS). If VARS is not set, the
> filter expression will be empty which matches nothing, so nothing is
> printed.
> 
> Note that the old behaviour can still be achieved with:
> make printvars VARS=%

... with a very minor difference: now, the VARS variable is present when
it was not for a simple 'printavrs'.

I also wondered if we should not just error out now when VARS is empty
(or unset, which is the same in make), or people used to using printvars
and parsing the output, could get confused somehow. But oh well, that
case was already broken anyway...

> Update the 'make help' text to match the new behaviour.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>

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

Regards,
Yann E. MORIN.

> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a64196f9c3..6af8923892 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1031,7 +1031,7 @@ $(BUILD_DIR)/.br2-external.in: $(BUILD_DIR)
>  printvars:
>  	@:
>  	$(foreach V, \
> -		$(sort $(if $(VARS),$(filter $(VARS),$(.VARIABLES)),$(.VARIABLES))), \
> +		$(sort $(filter $(VARS),$(.VARIABLES))), \
>  		$(if $(filter-out environment% default automatic, \
>  				$(origin $V)), \
>  		$(if $(QUOTED_VARS),\
> @@ -1124,7 +1124,7 @@ help:
>  	@echo '  source                 - download all sources needed for offline-build'
>  	@echo '  external-deps          - list external packages used'
>  	@echo '  legal-info             - generate info about license compliance'
> -	@echo '  printvars              - dump all the internal variables'
> +	@echo '  printvars              - dump internal variables selected with VARS=...'
>  	@echo
>  	@echo '  make V=0|1             - 0 => quiet build (default), 1 => verbose build'
>  	@echo '  make O=dir             - Locate all output files in "dir", including .config'
> -- 
> 2.20.1
> 

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

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

* [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars'
  2019-03-12 17:55       ` [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars' Arnout Vandecappelle
@ 2019-03-12 18:44         ` Yann E. MORIN
  0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2019-03-12 18:44 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-03-12 18:55 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> Add a 'VARS=...' setting to the example. To make it clear that several
> variables can be specified, use two variables in the first example.
> Only 2 variables are printed, so the ... is removed.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>

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

Regards,
Yann E. MORIN.

> ---
>  docs/manual/make-tips.txt | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt
> index ea1d825bef..869b6807dd 100644
> --- a/docs/manual/make-tips.txt
> +++ b/docs/manual/make-tips.txt
> @@ -80,18 +80,18 @@ to xref:ccache[].
>  
>  .Dumping the internal make variables:
>  
> -One can dump all the variables known to make, along with their values:
> +One can dump the variables known to make, along with their values:
>  
>  ----
> - $ make -s printvars
> - VARIABLE=value_of_variable
> - ...
> + $ make -s printvars VARS='VARIABLE1 VARIABLE2'
> + VARIABLE1=value_of_variable
> + VARIABLE2=value_of_variable
>  ----
>  
>  It is possible to tweak the output using some variables:
>  
>  - +VARS+ will limit the listing to variables which names match the
> -  specified make-pattern
> +  specified make-patterns - this must be set else nothing is printed
>  - +QUOTED_VARS+, if set to +YES+, will single-quote the value
>  - +RAW_VARS+, if set to +YES+, will print the unexpanded value
>  
> -- 
> 2.20.1
> 

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

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

* [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set
  2019-03-12 17:55     ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Arnout Vandecappelle
  2019-03-12 17:55       ` [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars' Arnout Vandecappelle
  2019-03-12 18:42       ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Yann E. MORIN
@ 2019-03-12 21:01       ` Thomas Petazzoni
  2 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2019-03-12 21:01 UTC (permalink / raw)
  To: buildroot

On Tue, 12 Mar 2019 18:55:34 +0100
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> wrote:

> Using 'make printvars' for printing all variables is not very useful.
> E.g. all macros will output some bogus value. In addition, the same can
> be achieved with 'make -p'.
> 
> We can simply remove the condition on $(VARS). If VARS is not set, the
> filter expression will be empty which matches nothing, so nothing is
> printed.
> 
> Note that the old behaviour can still be achieved with:
> make printvars VARS=%
> 
> Update the 'make help' text to match the new behaviour.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Both applied, thanks!

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

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

end of thread, other threads:[~2019-03-12 21:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 10:57 [Buildroot] [PATCH] docs/manual: add note about spurious errors duing make printvars Martin Kepplinger
2019-03-12 12:33 ` Arnout Vandecappelle
2019-03-12 13:14   ` yann.morin at orange.com
2019-03-12 13:53     ` Arnout Vandecappelle
2019-03-12 14:04       ` yann.morin at orange.com
2019-03-12 17:36   ` Yann E. MORIN
2019-03-12 17:55     ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Arnout Vandecappelle
2019-03-12 17:55       ` [Buildroot] [PATCH 2/2] docs/manual: document new behaviour of 'make printvars' Arnout Vandecappelle
2019-03-12 18:44         ` Yann E. MORIN
2019-03-12 18:42       ` [Buildroot] [PATCH 1/2] printvars: don't print anything when VARS is not set Yann E. MORIN
2019-03-12 21:01       ` Thomas Petazzoni

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.