title: Why does this makefile recipe always run?
body: <p>My Makefile downloads a number of third-party files if they are not locally available.</p>
  
  <pre><code>CLOSURE_VERSION=20161024
  CLOSURE_BASE_URL="http://dl.google.com/closure-compiler"
  
  build/bin/closure-compiler.jar: build/src/hashes/closure-compiler-${CLOSURE_VERSION}.tar.gz.sha256
      download-if-sha-matches &lt;$&lt; &gt;$@.tar.gz \
          ${CLOSURE_BASE_URL}/compiler-${CLOSURE_VERSION}.tar.gz
      tar -zxf $@.tar.gz closure-compiler-v${CLOSURE_VERSION}.jar
      mv closure-compiler-v${CLOSURE_VERSION}.jar $@
      rm $@.tar.gz
  </code></pre>
  
  <p>Here, <code>build/src/hashes/closure-compiler-${CLOSURE_VERSION}.tar.gz.sha256</code> is the saved hash of the version of the file which we already know is correct.</p>
  
  <p><code>download-if-sha-matches &lt;hash &gt;outfile url</code> downloads the <code>url</code> and compares its hash to stdin, failing if they don't match.</p>
  
  <p>This recipe works except that it always runs, even if <code>build/bin/closure-compiler.jar</code> already exists. Naturally, its timestamp is later than that of <code>$&lt;</code> so I would expect this to not execute the recipe the second time I run make.</p>
  
  <p>What have I gotten wrong?</p>