[Tfug] How do I get automake to set build number?
Andrew Ayre
andy at britishideas.com
Tue Apr 17 14:23:46 MST 2007
I use subversion for all software development. It is possible to commit and
then automatically insert the revision number into a #define, which then can
be used any way you like. The advantage is that it is automatic and allows
you to tie a release to a specific subversion revision.
Andy
-----Original Message-----
From: tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org]On Behalf Of
Joe Blais
Sent: Tuesday, April 17, 2007 2:07 PM
To: Tfug
Subject: [Tfug] How do I get automake to set build number?
Hello -
I've been using KDevelop with the GNU automake stuff.
I would really like to get a build number into a version string.
Besides not knowing how to get it to update a version string, I don't even
know where it's keeping the data for the version string. I just haven't
gotten that deep into the automagic I guess.
I could put a line into the makefile, but automake remakes that.
I visual studio, I made an app that would parse a version.h file that I had
for every project, and increment the build number. In versio.h I had
several defines for the various version string fields that winders liked to
have:
#ifndef VERSION_H
#define VERSION_H
#define FILE_VERSION 1, 1, 0, 31
#define PROD_VERSION 1, 1, 0, 31
#define FILE_VER_STR "1, 1, 0, 31"
#define PROD_VER_STR "1, 1, 0, 31"
#endif
I was able to set pre-build events in a project. The event would call my
utility, something like: incbuild version.h
Every build then had a unique version string, and when frantically figuring
out what version of code was being tested and running on what machine, it
really saved me, if I saved the code.
Linux seems to mess with file dates differently than winders, unless I need
to look at a different date of a file so I can track it. It seems modified
and accessed are for the specific copy of a file, not the original one.
Anyway --
Does anyone out there have a good method of identifying the specific build
of an application?
Thanks
Joe
_______________________________________________
Tucson Free Unix Group - tfug at tfug.org
Subscription Options:
http://www.tfug.org/mailman/listinfo/tfug_tfug.org
More information about the tfug
mailing list