[Tfug] How do I get automake to set build number?

Joe Blais joe.blais at pti-instruments.com
Tue Apr 17 17:22:56 MST 2007



>
> I use a small program from the subversion developers that checks the
> revision of all files in a folder and then uses the highest revision found
> for the #define value. So although revision numbers are per file I use it
> essentially per release. Unfortunately I'm required to develop
> using Windows
> so the program I use is for Windows. But maybe there is something similar
> for linux? I would be suprised if there wasn't.
>
> Andy
>

I was just starting to port over the small program I made for VisualStudio
to Linux, every time i hit make, it gets called. The program increments the
build number in my version.h file.  The problem is,how can I automatically
trigger that program from within the makefile - seeing as how gnu makes the
makefile from the makefile.am and a host of other files that look real
scarry on the inside.  The makefile.am seems to have been put under CVS
control by KDevelop, so I could put something in there, but when looking
through the list of macro's from GNU, I didn't see anything that would cause
some conditional program execution.  makefile.am contains the list of files
to build, anmd Kdevelop edits that file through it's automakemanager (and I
can manually) but all it has is a list of files in some MACROs

I guess I should just make scripts that call the incrementor program, and
then call make.  I'ts just that I like automagic - and then cuss when it
does what I don't expect! And then, worst of all, I have to remember to do
something, which I won't do the ONE time I really need to.

joe





More information about the tfug mailing list