All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] Makefile: error out printvars target when VARS is empty or unset
@ 2022-08-03 17:05 Yann E. MORIN
  2022-08-04  8:00 ` David Laight
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2022-08-03 17:05 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=ec82347cdee190a5fa451b83cdb3727c78cda315
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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'"
+	@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

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

end of thread, other threads:[~2022-08-04 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-08-04 11:47   ` Quentin Schulz
2022-08-04 15:08     ` Arnout Vandecappelle
2022-08-04 21:16   ` Yann E. MORIN

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.