make . make , , . $(error ...), , make .
, a $(if ...) $(or ...) & c. . ,
.PHONY: rule-with-assert
rule-with-assert:
$(if $(realpath ${should-be-file}/),$(error Assertion failure: ${should-be-file} is a folder!))
⋮
, / realpath.
, .
assert-is-file = $(if $(realpath $1/),$(error Assertion failure: [$1] is a folder!))
.PHONY: rule-with-assert
rule-with-assert:
$(call assert-is-file,${should-be-file})
⋮
, , $(call assert-is-file,…) .
$(error) ,
.