You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
458 B
Makefile

# check_defined is a function that will error if the passed in variable is
# undefined.
#
# usage:
# install:
# $(call check_defined, var1)
# $(call check_defined, var2)
#
# Copied this from https://gist.github.com/bbl/bf4bf5875d0c705c4cd78d264f98a8b1
check_defined = \
$(strip $(foreach 1,$1, \
$(call __check_defined,$1,$(strip $(value 2)))))
__check_defined = \
$(if $(value $1),, \
$(error Undefined $1$(if $2, ($2))))