Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Yann E.MORIN' <yann.morin.1998@free.fr>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [git commit] Makefile: error out printvars target when VARS is empty or unset
Date: Thu, 4 Aug 2022 08:00:26 +0000	[thread overview]
Message-ID: <ffe375e2a41b4e069ce2632c28cea51d@AcuMS.aculab.com> (raw)
In-Reply-To: <20220803165240.BEDEB86D85@busybox.osuosl.org>

From: Yann E.MORIN
> Sent: 03 August 2022 18:05
> 
> printvars returns nothing when VARS is not passed or empty. This is done
> on purpose, see commit fd5bd12379dc ("Makefile: printvars: don't print
> anything when VARS is not set").
> 
> An error message making explicit what is required from the user in order
> to use printvars is however better than silently doing nothing.
> 
> This adds a check for a non-empty VARS variable.
> 
> Cc: Quentin Schulz <foss+buildroot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 07b594ea8a..5f266e36b2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1058,6 +1058,10 @@ endif
>  # to workaround a bug in make 4.3; see https://savannah.gnu.org/bugs/?59093
>  .PHONY: printvars
>  printvars:
> +ifndef VARS
> +	@echo "Please pass a non-empty VARS to 'make printvars'"

Shouldn't that have a >&2 ??

	David

	
> +	@exit 1
> +endif
>  	@:
>  	$(foreach V, \
>  		$(sort $(foreach X, $(.VARIABLES), $(filter $(VARS),$(X)))), \
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-08-04  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 17:05 [Buildroot] [git commit] Makefile: error out printvars target when VARS is empty or unset Yann E. MORIN
2022-08-04  8:00 ` David Laight [this message]
2022-08-04 11:47   ` Quentin Schulz
2022-08-04 15:08     ` Arnout Vandecappelle
2022-08-04 21:16   ` 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=ffe375e2a41b4e069ce2632c28cea51d@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=buildroot@buildroot.org \
    --cc=yann.morin.1998@free.fr \
    /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