title: Basic if else statement in Makefile
body: <p>I'm trying to execute a simple if else statement in a Makefile:</p>
  
  <pre><code>check:
    if [ -z "$(APP_NAME)" ]; then \
      echo "Empty" \
    else \
      echo "Not empty" \
    fi
  </code></pre>
  
  <p>When I execute <code>make check</code> I get the following error:</p>
  
  <pre><code>if [ -z "" ]; then
  /bin/bash: -c: line 1: syntax error: unexpected end of file
  make: *** [check] Error 2
  </code></pre>
  
  <p>Any idea what I'm doing wrong?</p>
  
  <p>I know I can use the following, but I have a lot of logic after the echos so I need to spread it out across multiple lines:</p>
  
  <pre><code>check:
    [ -z "$(PATH)" ] &amp;&amp; echo "Empty" || echo "Not empty"
  </code></pre>