title: Autotool automake output executable filename with version
body: <p>I'm trying to add to the output executable filename of a autotool project the version number.</p>
  
  <p>With libs is very simple: you can add <code>-version-info</code> option to <code>Makefile.am</code></p>
  
  <p><strong>How can I do the same thing with <code>bin_PROGRAMS</code></strong></p>
  
  <p>So far I tried:</p>
  
  <pre><code>HELLO_VERSION_CURRENT = 1
  HELLO_VERSION_REVISION = 2
  HELLO_VERSION_AGE = 1
  
  bin_PROGRAMS = hello_${HELLO_VERSION_CURRENT}_${HELLO_VERSION_REVISION}_${HELLO_VERSION_AGE}
  hello_SOURCES = hello.c
  </code></pre>
  
  <p>In this way it doesn't compile because of <code>SOURCES</code> must be: <code>hello_1_2_1_SOURCES</code>, but I don't know how to tell to automake that.</p>
  
  <p>Another way could be to run a post-build script: how can I add post-build action to <code>Makefile.am</code>?</p>