[Buildroot] [PATCH] Makefile: make printvars target print all variables if no VARS set
Yann E. MORIN
yann.morin.1998 at free.fr
Mon Aug 1 15:12:08 UTC 2022
Quentin, All,
On 2022-08-01 15:30 +0200, Quentin Schulz spake thusly:
> From: Quentin Schulz <quentin.schulz at 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 at 0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz at 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 at 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. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list