These functions control the way make runs. Generally, they are used to provide information to the user of the makefile or to cause make to stop if some sort of environmental error is detected.
ifdef ERROR1 $(error error is $(ERROR1)) endif
will generate a fatal error during the read of the makefile if the
ERROR1 is defined. Or,
ERR = $(error found an error!) .PHONY: err err: ; $(ERR)
will generate a fatal error while
make is running, if the
err target is invoked.
errorfunction, above, except that
makedoesn't exit. Instead, text is expanded and the resulting message is displayed, but processing of the makefile continues.
The result of the expansion of this function is the empty string.