How to ensure Makefile variable is set as a prerequisite?
This will cause a fatal error if ENV is undefined and something needs it (in GNUMake, anyway). .PHONY: deploy check-env deploy: check-env … other-thing-that-needs-env: check-env … check-env: ifndef ENV $(error ENV is undefined) endif (Note that ifndef and endif are not indented – they control what make “sees”, taking effect before the Makefile is run. … Read more