Makefile: error out printvars target when VARS is empty or unset
printvars returns nothing when VARS is not passed or empty. This is done on purpose, see commitfd5bd12379
("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> (cherry picked from commitec82347cde
) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
a344a5b7cb
commit
c47f728a78
4
Makefile
4
Makefile
@ -1061,6 +1061,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)))), \
|
||||
|
Loading…
Reference in New Issue
Block a user