I have this code inside Makefile
SHELL=/bin/bash
define PYTHON_VERSION
3.7.4
endef
define DEFAULT
echo BUILD_ENV:
if [ -z "$(PYTHON_VERSION)" ]
then
printf '$(PYTHON_VERSION) is empty.\n'
exit 1
fi
endef
default:
$(DEFAULT)
build:
$(DEFAULT)
It gives me (running make build
):
echo BUILD_ENV: BUILD_ENV: if [ -z "3.7.4" ] then printf '3.7.4 is empty.\n' exit 1 /bin/bash: -c: line 1: syntax error: unexpected end of file
How to fix this error? (it happens on macOs BigSur)