[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

hints for integrating 'svnversion' into autoconf/automake environment

From: Michael Reinelt <reinelt_at_eunet.at>
Date: 2007-01-19 10:46:59 CET

Hi there,

I'm trying to integrate the repository version number (the output of
'svnversion') into the build process of my project.

At the moment I use a small shell script to create a "svn_version.h"
containing a "#define SVN_VERSION nnn" line, and I include this file in
the main c source, and output the version number. This works fine.

But I'm not sure how and when to call this script.

I want to get the version number checked and/or updated on every 'make'
invocation, to make sure that the repo version is really up to date in
the executable (to make bug reports easier).

OTOH, if a user does not use the svn repo directly, but a .tar.gz
distribution, there may be no 'svnversion' (no svn client installed). So
the script and/or the invocation must handle this condition correctly.

I failed to find a way to call the script from my configure.in. Either
the script is not called, or it is called (and does not change anything,
because the repo version did not change), but the link process is called
again (which is not necessary because nothing has changed)

Any help is greatly appreciated!

TIA, Michael

-- 
Michael Reinelt <reinelt@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 19 10:47:27 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.