Hi Raoul, this is useful, but unfortunately it does not tell how to do it with GNU autotools. I'll keep this on my mind when I try to tackle it, but so far it looks like I need too much time to find out the details. If someone could suggest a solution within the GNU build system, I'd love to include that ASAP.
Rainer > -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of Raoul Bhatia [IPAX] > Sent: Wednesday, October 28, 2009 11:40 AM > To: rsyslog-users > Subject: Re: [rsyslog] version numbers from git repository > > On 10/23/2009 07:54 AM, Rainer Gerhards wrote: > > I've looked a bit into the issue. Neither of them use the GNU build > system. > > In essence, it boils down to running "git describe" as part of the > build > > process, generating a file with it. However, I do not know how I may > achieve > > that. It should probably be run during the ./configure stage. Maybe > someone > > can provide some advise ;) > > i like the way drbd includes the git-hash in its version output: > > # cat /proc/drbd > > version: 8.3.2 (api:88/proto:86-90) > > GIT-hash: dd7985327f146f33b86d4bff5ca8c94234ce840e build by p...@fat- > tyre, 2009-07-03 15:35:39 > > ... > > take a look at line 112ff at (especially line 125) > http://git.drbd.org/?p=drbd-8.3.git;a=blob;f=drbd/Makefile;hb=HEAD > > there, a drbd_buildtag.c file is created with the help of: > > git rev-parse HEAD > > the output of this Makefile section is: > > /* automatically generated. DO NOT EDIT. */ > > #include <linux/drbd_config.h> > > const char * drbd_buildtag(void) > > { > > return "GIT-hash: 9ce425f51860f1205395bf7127cad3c427070837" > > " build by [email protected], 2008-09-04 17:00:24"; > > } > > one can use this, or something similar using e.g. git-describe. > > cheers, > raoul > -- > ____________________________________________________________________ > DI (FH) Raoul Bhatia M.Sc. email. [email protected] > Technischer Leiter > > IPAX - Aloy Bhatia Hava OEG web. http://www.ipax.at > Barawitzkagasse 10/2/2/11 email. [email protected] > 1190 Wien tel. +43 1 3670030 > FN 277995t HG Wien fax. +43 1 3670030 15 > ____________________________________________________________________ > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

