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>
This commit is contained in:
Yann E. MORIN 2022-08-04 23:05:01 +02:00
parent 1500b7d5c8
commit 466d65d73e

View File

@ -1059,8 +1059,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, \