title: Make error for ifeq: syntax error near unexpected token
body: <p>I'm writing a Makefile that does string matching at one place, the code is like:</p>
  <pre><code>if test ...; \
      then \
      shell scripts... \
  fi
  
  ifeq ($(DIST_TYPE),nightly)
      shell scripts ...
  endif
  </code></pre>
  <p>Here the first <code>if</code> is shell script, the second <code>ifeq</code> is GNU Make's conditional. However the following error generates:</p>
  <blockquote>
  <p>ifeq (nightly,nightly)</p>
  <p>/bin/sh: -c: line 0: syntax error near unexpected token `nightly,nightly'</p>
  <p>/bin/sh: -c: line 0: `ifeq (nightly,nightly)'</p>
  </blockquote>
  <p>What's happening here? It seems that Make is trying to call the shell.</p>