title: How to use shell commands in Makefile
body: <p>I'm trying to use the result of <code>ls</code> in other commands (e.g. echo, rsync):</p>
  
  <pre><code>all:
      &lt;Building, creating some .tgz files - removed for clarity&gt;
      FILES = $(shell ls)
      echo $(FILES)
  </code></pre>
  
  <p>But I get:</p>
  
  <pre><code>make
  FILES = Makefile file1.tgz file2.tgz file3.tgz
  make: FILES: No such file or directory
  make: *** [all] Error 1
  </code></pre>
  
  <p>I've tried using <code>echo $$FILES</code>, <code>echo ${FILES}</code> and <code>echo $(FILES)</code>, with no luck.</p>