[PATCH] Generate/update a version.h header file.

Dirk Hohndel dirk at hohndel.org
Tue Feb 26 10:46:21 PST 2013


Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> writes:

> On Tue, 26 Feb 2013, Dirk Hohndel wrote:
>>
>> So what I really want is for the Makefile to create the version.h file
>> with the VERSION from the Makefile
>
> So, are you happy with the patch, after considering my comment:
>
> On Tue, 26 Feb 2013, Cristian Ionescu-Idbohrn wrote:
>> On Tue, 26 Feb 2013, Lubomir I. Ivanov wrote:
>> >
>> > >  GET_VERSION = ./scripts/get-version
>> > >  VERSION_STRING := $(shell $(GET_VERSION) linux || echo "v$(VERSION)")
>> > > @@ -157,7 +163,13 @@ OBJS =     main.o dive.o time.o profile.o info.o equipment.o divelist.o deco.o plann
>> >
>> > my attempt also handled the "no tags" case via "No names found" string
>> > check.
>>
>> It should handle that, as the ./scripts/get-version will 'exit 1'.
>
> or you want me to do something in particular?

Couple more comments after playing with this some more...

when doing 

make clean && make

I get 

/bin/sh: version.h: No such file or directory
updating version.h to 3.0-65-g1908caa95cef

That should be caught, I guess.

And of course this needs to be integrated with gtk-gui.c (and it should
define VERSION_STRING not VERSION).

I did the last two things so I can test and will push this out for now,
hoping that you can address the other issues I mentioned...

/D


More information about the subsurface mailing list