* [Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set
@ 2022-08-01 13:30 Quentin Schulz
2022-08-01 15:12 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2022-08-01 13:30 UTC (permalink / raw)
To: buildroot; +Cc: Quentin Schulz, Quentin Schulz
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
VARS is not defined by default, meaning the filter will not return
anything which ends up making `make printvars` also return nothing.
Fix this by setting VARS to '%' - which is the match-all pattern - in
printvars using a conditional variable assignment operator, such as
what's currently done for show-vars.
Fixes: 5c54c3ef3db2 ("Makefile: workaround make 4.3 issue for 'printvars and 'show-vars'")
Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index a743e42f91..f1b5494726 100644
--- a/Makefile
+++ b/Makefile
@@ -1057,6 +1057,7 @@ endif
# Note: we iterate of .VARIABLES and filter each variable individually,
# to workaround a bug in make 4.3; see https://savannah.gnu.org/bugs/?59093
.PHONY: printvars
+printvars: VARS?=%
printvars:
@:
$(foreach V, \
--
2.37.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set
2022-08-01 13:30 [Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set Quentin Schulz
@ 2022-08-01 15:12 ` Yann E. MORIN
2022-08-01 15:15 ` Quentin Schulz
0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2022-08-01 15:12 UTC (permalink / raw)
To: Quentin Schulz; +Cc: Quentin Schulz, buildroot
Quentin, All,
On 2022-08-01 15:30 +0200, Quentin Schulz spake thusly:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> VARS is not defined by default, meaning the filter will not return
> anything which ends up making `make printvars` also return nothing.
In fact, this is the expected behaviour, see fd5bd12379dc (Makefile:
printvars: don't print anything when VARS is not set).
> Fix this by setting VARS to '%' - which is the match-all pattern - in
> printvars using a conditional variable assignment operator, such as
> what's currently done for show-vars.
And see da4cb17aa165 (Makefile: introduce show-vars, a json-formatted
equivalent to printvars) for the reason why show-vars defaults to VAR=%
So, I've marked this patch as rejected.
Regards,
Yann E. MORIN.
> Fixes: 5c54c3ef3db2 ("Makefile: workaround make 4.3 issue for 'printvars and 'show-vars'")
> Cc: Quentin Schulz <foss+buildroot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index a743e42f91..f1b5494726 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1057,6 +1057,7 @@ endif
> # Note: we iterate of .VARIABLES and filter each variable individually,
> # to workaround a bug in make 4.3; see https://savannah.gnu.org/bugs/?59093
> .PHONY: printvars
> +printvars: VARS?=%
> printvars:
> @:
> $(foreach V, \
> --
> 2.37.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set
2022-08-01 15:12 ` Yann E. MORIN
@ 2022-08-01 15:15 ` Quentin Schulz
2022-08-01 16:10 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2022-08-01 15:15 UTC (permalink / raw)
To: Yann E. MORIN, Quentin Schulz; +Cc: buildroot
Hi Yann,
On 8/1/22 17:12, Yann E. MORIN wrote:
> Quentin, All,
>
> On 2022-08-01 15:30 +0200, Quentin Schulz spake thusly:
>> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>
>> VARS is not defined by default, meaning the filter will not return
>> anything which ends up making `make printvars` also return nothing.
>
> In fact, this is the expected behaviour, see fd5bd12379dc (Makefile:
> printvars: don't print anything when VARS is not set).
>
>> Fix this by setting VARS to '%' - which is the match-all pattern - in
>> printvars using a conditional variable assignment operator, such as
>> what's currently done for show-vars.
>
> And see da4cb17aa165 (Makefile: introduce show-vars, a json-formatted
> equivalent to printvars) for the reason why show-vars defaults to VAR=%
>
> So, I've marked this patch as rejected.
>
I should have made some research first it seems like :) Maybe we could
print some error message if VARS is not set? In any case, unrelated to
this patch.
Sorry for the noise.
Cheers,
Quentin
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set
2022-08-01 15:15 ` Quentin Schulz
@ 2022-08-01 16:10 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2022-08-01 16:10 UTC (permalink / raw)
To: Quentin Schulz; +Cc: Quentin Schulz, buildroot
Quentin, All,
On 2022-08-01 17:15 +0200, Quentin Schulz spake thusly:
> On 8/1/22 17:12, Yann E. MORIN wrote:
> >On 2022-08-01 15:30 +0200, Quentin Schulz spake thusly:
> >>From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> >>VARS is not defined by default, meaning the filter will not return
> >>anything which ends up making `make printvars` also return nothing.
> >In fact, this is the expected behaviour, see fd5bd12379dc (Makefile:
> >printvars: don't print anything when VARS is not set).
> I should have made some research first it seems like :) Maybe we could print
> some error message if VARS is not set? In any case, unrelated to this patch.
Yeah, maybe... If you can come up with something that is not too ugly...
And don't forget to update the manual while at it. ;-]
> Sorry for the noise.
n.p.
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. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-01 16:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-01 13:30 [Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set Quentin Schulz
2022-08-01 15:12 ` Yann E. MORIN
2022-08-01 15:15 ` Quentin Schulz
2022-08-01 16:10 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox