* [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset
@ 2022-08-02 12:35 Quentin Schulz
2022-08-03 17:07 ` Yann E. MORIN
2022-09-14 9:29 ` Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: Quentin Schulz @ 2022-08-02 12:35 UTC (permalink / raw)
To: buildroot; +Cc: Quentin Schulz, Quentin Schulz, yann.morin.1998
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
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>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index a743e42f91..3cbcfa9196 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)))), \
--
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: error out printvars target when VARS is empty or unset
2022-08-02 12:35 [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset Quentin Schulz
@ 2022-08-03 17:07 ` Yann E. MORIN
2022-09-14 9:29 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2022-08-03 17:07 UTC (permalink / raw)
To: Quentin Schulz; +Cc: Quentin Schulz, buildroot
Quentin, All,
On 2022-08-02 14:35 +0200, Quentin Schulz spake thusly:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> 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>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index a743e42f91..3cbcfa9196 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)))), \
> --
> 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: error out printvars target when VARS is empty or unset
2022-08-02 12:35 [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset Quentin Schulz
2022-08-03 17:07 ` Yann E. MORIN
@ 2022-09-14 9:29 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2022-09-14 9:29 UTC (permalink / raw)
To: Quentin Schulz; +Cc: Quentin Schulz, yann.morin.1998, buildroot
>>>>> "Quentin" == Quentin Schulz <foss+buildroot@0leil.net> writes:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> 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>
Committed to 2022.05.x and 2022.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset
2022-09-12 9:55 [Buildroot] [PATCH 0/5] add support for libedit and linenoise CLI implementations for nftables Quentin Schulz
@ 2022-09-12 9:55 ` Quentin Schulz
0 siblings, 0 replies; 4+ messages in thread
From: Quentin Schulz @ 2022-09-12 9:55 UTC (permalink / raw)
To: buildroot; +Cc: Quentin Schulz, Quentin Schulz
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
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>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index a743e42f91..3cbcfa9196 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)))), \
--
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
end of thread, other threads:[~2022-09-14 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 12:35 [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset Quentin Schulz
2022-08-03 17:07 ` Yann E. MORIN
2022-09-14 9:29 ` Peter Korsgaard
2022-09-12 9:55 [Buildroot] [PATCH 0/5] add support for libedit and linenoise CLI implementations for nftables Quentin Schulz
2022-09-12 9:55 ` [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset Quentin Schulz
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.