title: How to assign the output of a command to a Makefile variable
body: <p>I need to execute some make rules conditionally, only if the Python installed is greater than a certain version (say 2.5).</p>
  
  <p>I thought I could do something like executing:</p>
  
  <pre><code>python -c 'import sys; print int(sys.version_info &gt;= (2,5))'
  </code></pre>
  
  <p>and then using the output ('1' if ok, '0' otherwise) in a <code>ifeq</code> make statement.</p>
  
  <p>In a simple bash shell script it's just:</p>
  
  <pre><code>MY_VAR=`python -c 'import sys; print int(sys.version_info &gt;= (2,5))'`
  </code></pre>
  
  <p>but that doesn't work in a Makefile.</p>
  
  <p>Any suggestions? I could use any other sensible workaround to achieve this.</p>