title: Makefile: prevent infinite pattern recursion
body: <p>I thought this is quite simple</p>
  
  <pre><code>%.png: ../figs/%.png
          convert $? -resize '40%' $@
  </code></pre>
  
  <p>That is, I want to generate an image in this directory from the corresponding image in "../figs/" .</p>
  
  <p>But, the above leads to an infinite chain of dependencies because <code>../figs/foo.png</code> matches <code>%.png</code> and therefore make tries to check <code>../figs/../figs/foo.png</code>, which matches <code>%.png</code> and therefore make tries to . . .
  Eventually, make stops with "File name too long".</p>
  
  <p>I must be missing something.  What is a clean solution?</p>