|
From: | Daniel Heck |
Subject: | [Enigma-devel] Re: SVN revision number |
Date: | Wed, 27 Feb 2008 20:14:56 +0100 |
User-agent: | Thunderbird 2.0.0.6 (X11/20071022) |
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.
Cheers, Daniel
[Prev in Thread] | Current Thread | [Next in Thread] |