From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Roosen Henri <Henri.Roosen@ginzinger.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 1/1] Makefile: workaround make 4.3 issue for 'printvars and 'show-vars'
Date: Sat, 30 Jul 2022 14:19:55 +0200 [thread overview]
Message-ID: <20220730121955.GS3168@scaer> (raw)
In-Reply-To: <c73779fc937946ae6279b66998d6017ba0ffd507.camel@ginzinger.com>
Henri, All,
On 2022-07-29 21:49 +0000, Roosen Henri spake thusly:
> Event though the bug with make 4.3 has been reported and fixed, there
> has not been a release of make with the fix for a long time, see [1].
>
> As the root cause seems the 'filter' command cannot handle large
> chunks of data, like .VARIABLES, we can workaround the problem by
> using a foreach command over .VARIABLES, then use the filter command.
>
> It might not be logical to program it that way, but at least the
> functionality is now usable.
Awesome! Just awesome! 👍
I just added a small comment in the Makefile to explain that, and
reference the bug.
> [1] https://savannah.gnu.org/bugs/?59093#comment10
>
> Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> Makefile | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index bf101ff770..a856f69685 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1056,23 +1056,16 @@ ifeq ($(NEED_WRAPPER),y)
> $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
> endif
>
> -.PHONY: check-make-version
> -check-make-version:
> -ifneq ($(filter $(RUNNING_MAKE_VERSION),4.3),)
> - @echo "Make 4.3 doesn't support 'printvars' and 'show-vars' recipes"
> - @exit 1
> -endif
> -
> # printvars prints all the variables currently defined in our
> # Makefiles. Alternatively, if a non-empty VARS variable is passed,
> # only the variables matching the make pattern passed in VARS are
> # displayed.
> # show-vars does the same, but as a JSON dictionnary.
> .PHONY: printvars
> -printvars: check-make-version
> +printvars:
> @:
> $(foreach V, \
> - $(sort $(filter $(VARS),$(.VARIABLES))), \
> + $(sort $(foreach X, $(.VARIABLES), $(filter $(VARS),$(X)))), \
> $(if $(filter-out environment% default automatic, \
> $(origin $V)), \
> $(if $(QUOTED_VARS),\
> @@ -1082,11 +1075,11 @@ printvars: check-make-version
>
> .PHONY: show-vars
> show-vars: VARS?=%
> -show-vars: check-make-version
> +show-vars:
> @:
> $(info $(call clean-json, { \
> $(foreach V, \
> - $(sort $(filter $(VARS),$(.VARIABLES))), \
> + $(sort $(foreach X, $(.VARIABLES), $(filter $(VARS),$(X)))), \
> $(if $(filter-out environment% default automatic, $(origin $V)), \
> "$V": { \
> "expanded": $(call mk-json-str,$($V))$(comma) \
> --
> 2.30.2
>
>
> _______________________________________________
> 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
next prev parent reply other threads:[~2022-07-30 12:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 21:49 [Buildroot] [PATCH 1/1] Makefile: workaround make 4.3 issue for 'printvars and 'show-vars' Roosen Henri
2022-07-30 12:19 ` Yann E. MORIN [this message]
2022-08-01 13:36 ` Quentin Schulz
2022-08-01 14:49 ` Roosen Henri
2022-08-01 15:30 ` Yann E. MORIN
2022-08-01 15:37 ` Roosen Henri
2022-08-01 15:28 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220730121955.GS3168@scaer \
--to=yann.morin.1998@free.fr \
--cc=Henri.Roosen@ginzinger.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox