3.0 testing priorities
jefdriesen at telenet.be
Mon Feb 25 00:48:16 PST 2013
On 2013-02-24 23:56, Dirk Hohndel wrote:
> On Feb 24, 2013, at 2:46 PM, Linus Torvalds wrote:
>> On Sun, Feb 24, 2013 at 2:42 PM, Jan Schubert <Jan.Schubert at gmx.li>
>>> On 24.02.2013 23:20, Dirk Hohndel wrote:
>>>> After git pull; make clean; make. ?
>>> Oh, clean? After cleaning I get -25, before -16!?
>> The version string is compiled in. And we do not have a dependency
>> it changing.
> So for the shell and Makefile magicians out there… how hard would it
> be to have a rule that says "if the content of this file is different
> from that file, copy this file to that file and recompile gtk-gui.o"?
> Then we could start by always running the version script redirected
> into a file, do the comparison with the backup and automagically do
> the right thing. Only I have no idea how to do that :-)
I (with some help from the automake devs) implemented something like
that for libdivecomputer. Look in the src/Makefile.am file.
The "version" (which in libdivecomputer is just the git sha1 for HEAD,
but you can of course change that as you wish) is stored in the revision
file. When you compile, the version is written to a temporary file, and
compared with the revision file. Only when it's different the revision
file is updated. From the revision file a revision.h header file
defining a simple macro is generated, which can be included in the
source. Works very well for me.
The revision file is also shipped in tarballs, so it also works if you
are not using git.
More information about the subsurface