title: How to use ifeq inside of a define in GNU Make?
body: <p>I'm trying to do an ifeq inside of a define within a Makefile, but I seem to be running into some errors, and I'm wondering if I'm missing something.  I have the following Makefile:</p>
  
  <pre><code>$(info ---- start ----)
  ifeq ("X","Y")
  $(info DOES not appear_1)
  endif
  
  define TESTDEF
  ifeq ("X","Y")
  $(info SHOULD not appear)
  # $(error DEFINITELY SHOULD not error...)
  endif
  endef
  
  $(eval $(call TESTDEF, 1,2,3))
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>---- start ----
  SHOULD not appear
  Makefile:14: *** DEFINITELY SHOULD not error....  Stop.
  </code></pre>
  
  <p>Is there some trick that I'm missing?  Is it possible to do ifeq's inside define?  (note: this happens on both my native GNU 3.81 make, and on my mips uclibc cross-compiler)</p>