title: Assign a makefile variable value to a bash command result?
body: <p>I'm trying to assign the output of this command ( that is in my makefile ) to the makefile HEADER var like in this following line of code:</p>
  
  <pre><code>HEADER = $(shell for file in `find . -name *.h`;do echo $file; done)
  </code></pre>
  
  <p>The problem is that if I print HEADER in my makefile using:</p>
  
  <pre><code>print:
      @echo $(HEADER)
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile ile
  </code></pre>
  
  <p>And if I run this command directly in the console, and directly where my makefile is:</p>
  
  <pre><code>myaccount$ for file in `find . -name *.h`;do echo $file; done
  ./engine/helper/crypto/tomcrypt/headers/._tomcrypt_pk.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt_argchk.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt_cfg.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt_cipher.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt_custom.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt_hash.h
  ./engine/helper/crypto/tomcrypt/headers/tomcrypt_mac.h
  ....
  </code></pre>
  
  <p>So I get all my header files. I'm doing this to avoid manually specifying all my .h files manually in my makefile.</p>
  
  <p>Any ideas ?</p>