[Tfug] How do I get automake to set build number?
Ronald Sutherland
rsutherland at epccs.com
Tue Apr 17 19:57:53 MST 2007
Joe Blais wrote:
>> What you need to do is to have your version.h depend on all the other
>> source files, then have its make clause run the incrementor program.
>>
>> You will also need to make sure that any cvs commits after the build
>> commit version.h last, otherwise the commit (assuming you have RCS
>> keywords in your code) would indicate that the incrementor program should
>> run again.
>>
>> --
>> Mike Fitzgibbon
>>
>
> Mike -
>
> That's just the problem. If I make the makefile (I'd figure out the correct
> syntax) and add something like:
>
> myprog : version.h config.h
> cc myprog.cpp
>
> version.h :
> versioninc ./version.h
>
> ...
>
Ouch never thought about this but svn is putting the version last
modified in each of my Python scripts, which works as I want but its not
much help for a project build number unless you always manually modify
the file in which you
VERSION = "$Revision: 398 $".split()[1] #extract the build version from.
More information about the tfug
mailing list