title: GNU make yields "commands commence before first target" error
body: <p>In my makefile, I would like to check for the existence of a library and give an informative error message. I created a conditional that should exit the make process when the file is not found:</p>
  
  <pre><code> 9: ifeq ($(${JSONLIBPATH}),)
  10:    JSONLIBPATH = ${ALTJSONLIBDIR}/${LIBJSON}
  11: endif
  12: ifeq ($(${JSONLIBPATH}),)
  13:    $(error JSON library is not found. Please install libjson before building)
  14: endif 
  </code></pre>
  
  <p>My makefile gets stuck on line 13:</p>
  
  <pre><code>Makefile:13: *** commands commence before first target.  Stop.
  </code></pre>
  
  <p>After line 13, my makefile has its targets.</p>
  
  <p>I tried putting this conditional block into a target (e.g. a target called <code>isJSONLibraryInstalled</code>) but this does not execute correctly.</p>
  
  <p>How would I check for a file's existence and handle the error case, before processing targets? Apologies if this is a dumb question.</p>