Usage Define a variable: PYTHON_VERSION = "3.9.17" Use variable in a recipe use ${foo} or $(foo) syntax: install: pyenv install ${PYTHON_VERSION} # or install: pyenv install $(PYTHON_VERSION) Substitute variable: version: echo "Python version is ${PYTHON_VERSION}" Example PYTHON_VERSION = "3.9.17" install: pyenv install ${PYTHON_VERSION} --skip-existing pyenv local ${PYTHON_VERSION} poetry env use ${PYTHON_VERSION} poetry install How to read .env file in Makefile