title: How to ensure Makefile variable is set as a prerequisite?
body: <p>A Makefile <code>deploy</code> recipe needs an environment variable <code>ENV</code> to be set to properly execute itself, whereas other recipes don't care, e.g.,</p>
  <pre><code>ENV = 
  
  .PHONY: deploy hello
  
  deploy:
      rsync . $(ENV).example.com:/var/www/myapp/
  
  hello:
      echo &quot;I don't care about ENV, just saying hello!&quot;
  </code></pre>
  <p>How can I make sure this <code>ENV</code> variable is set? Is there a way to declare this makefile variable as a prerequisite of the deploy recipe? e.g.,</p>
  <pre><code>deploy: make-sure-ENV-variable-is-set
  </code></pre>