enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Re: SVN revision number


From: Ronald Lamprecht
Subject: Re: [Enigma-devel] Re: SVN revision number
Date: Fri, 29 Feb 2008 15:03:56 +0100
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Hi,

Daniel Heck wrote:
Till Harbaum / Lists wrote:
if you don't like the fact that there's some source file being auto generated you can of course always pass the output of svnversion directly into the compiler. I don't even want you to parse anything, so basically something not much more complex than "-D`svnversion` would do the trick.

But you want to update the revision number also when none of the c++ source files have changed, e.g., when updating the Lua scripts or the levels.

I would simply run svnversion every single time make is invoked and link the 
resulting version string into the program.

Both operations, svnversion and compilation, are quite expensive. I am not fond of executing both on every edition of the refman, graphics or Lua code change.

But both can be optimized. Instead of generating C++ code, that needs a compilation, we can simply store the revision info in an ASCII file that we can parse on startup, or as Lua code in a separate file.

Futheron the svnversion needs and should only to be executed if .svn is present, and .svn is either newer than the generated file, or the revision in the generated file does not end on 'M' for modified.

But one problem still remains - the hen-egg problem in case of a "make dist". If you svn update your workarea and call make dist, which needs to include the svnversion call, the make process will update the po files. These files need to be commited to get the resulting svn revision for an Enigma release. But the source distribution is packaged with a previous revision number,...

May be we should stop the original gettext makefile to update the po files on the dist target. That would mean splitting the dist target in those tasks that modifiy the sources (target "predist") and those that package the sources (including a svnversion). Thus a "make predist; svn commit; svn dist" would result in correct revision numbers.

Anyone volunteering in doing and thoroughly testing the necessary changes?

Greets,

Ronald




reply via email to

[Prev in Thread] Current Thread [Next in Thread]