title: how to run a system call from a makefile and save the answer in a variable
body: <p>i am trying to set a variable's value to use during the compilation.
  I try to do that in a separate makefile target </p>
  
  <pre><code>svnversion:
      SVN_REV=$(shell svnversion -cn | sed -e 's/.*://' -e 's/\([0-9]*\).*/\1/' | grep '[0-9]')
      $(info svn_rev = $(SVN_REV))
  </code></pre>
  
  <p>I have read that this is the way to set the value of a variable. 
  Yet when i run 'make' I see :</p>
  
  <pre><code>SVN_REV=613
  svn_rev = 
  </code></pre>
  
  <p>so the variable seems to be empty. Afterwards I expect that this variable will be present while the compilation takes place (in other targets). Is this the case? or should I add an 'export' command in the svnversion target? and how to I address the SVN_REV variable? $(SVN_REV) or $$(SVN_REV).</p>
  
  <p>thank you</p>