title: dynamically setting a makefile variable using awk
body: <p>I have a variable stoppoint defined in my makefile.
  I want to set this variable using the output of awk from withing my Makefile.</p>
  
  <p>I want to see if the second argument is main or not</p>
  
  <p>I have tried:</p>
  
  <pre><code>stoppoint = $(awk '$$2 ~ /main/ {print $$1}' file)  
  stoppoint = "$(awk '$$2 ~ /main/ {print $$1}' file)"  
  stoppoint = 'awk '$$2 ~ /main/ {print $$1}' file'
  awk '$$2 ~ /main/ {print $$1}' file &gt; stoppoint
  awk '$$2 ~ /main/ {print $$1}' file &gt; $(stoppoint)
  </code></pre>
  
  <p>However, I am unable to set this variable. 
  Kindly tell me how one can set a variable using awk inside a Makefile</p>
  
  <p>PS: On command line, the awk command gives me the output I desire...</p>
  
  <p>Thanks,
  Tejas</p>