|
From: | Ronald Lamprecht |
Subject: | Re: [Enigma-devel] Re: SVN revision number |
Date: | Thu, 28 Feb 2008 20:43:21 +0100 |
User-agent: | Thunderbird 2.0.0.12 (Windows/20080213) |
Hi, Daniel Heck wrote:
5. Solution approach: (svn info,...) generate revision to an extra file If you generate the info within the compilation you would presume that you operate on a svn workarea. But the make has to work on plain distributed sources, too. I noticed that several other projects did face the same problem. IIRC there are even comments on the svn homepage concerning this unsolved problem. Those projects that report revisions like Tortoise do edit them manually into the sources. I would appreciate any simple proper solution for this request.A simple shell script like cat <<EOF const char *svnVersion = "`which svnversion >/dev/null && svnversion`"; EOFcombined with a simple rule in the Makefile should do the trick. Svnversion prints "exported" as the revision number when the working directory is not a working copy and appends an "M" if the working copy contains modifications.
svnversion is the right tool. But it does not really help, as we have a classical "hen and egg" problem:You need to commit your changes and you need to update to get correct svnversion output. Now you need to start make again to generate the source which results in a modified source which need to be commited,...
Furtheron this modified piece of source would be a steady source of merge errors.
Just a keyword like direct support of svn would solve this problem. But IIRC I read some statements from the svn authors that this problem cannot be solved even within svn.
Greets, Ronald
[Prev in Thread] | Current Thread | [Next in Thread] |