title: How to print text in a makefile outside a target?
body: <p>For example, I am trying to test whether this works in my makefile preamble:</p>
  
  <pre class="lang-latex prettyprint-override"><code>ifneq (,$(shell latexmk --version 2&gt;/dev/null))
      echo Works
  else
      echo Does not Works
  endif
  
  all:
      do things...
  </code></pre>
  
  <p>Which does the error:</p>
  
  <pre><code>*** recipe commences before first target.  Stop.
  </code></pre>
  
  <p>Then, how to prints things outside rules? </p>
  
  <p>Makefile does not allow commands outside rules, or outside <code>result:=$(shell ...)</code>.</p>