Makefile: enhance reporting error about empty VARS

Use $(error) to simplify the code (drop "exit 1") and sned the message
to stderr.

Reported-by: David Laight <David.Laight@ACULAB.COM>
Reported-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>
(cherry picked from commit 466d65d73e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Yann E. MORIN 2022-08-04 23:05:01 +02:00 committed by Peter Korsgaard
parent f66f51b6c6
commit fe73c6e9d0

View File

@ -1062,8 +1062,7 @@ endif
.PHONY: printvars
printvars:
ifndef VARS
@echo "Please pass a non-empty VARS to 'make printvars'"
@exit 1
$(error Please pass a non-empty VARS to 'make printvars')
endif
@:
$(foreach V, \