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

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Tue Feb 26 09:38:17 PST 2013


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
>
> sorry, this a on a quick look....does it handle the "not in a git
> repository" case (e.g. tarballs) ?
> 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'.

> >  clean:
> > -       rm -f $(OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot
> > +       rm -f $(OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot \
> > +               $(VERSION_FILE)
> >         rm -rf share .dep
>
> a potential problem at "clean".
> we may want to keep the version file in case of tarball distributions,
> so it should not be deleted, but simply overridden i'd think.
> this way the tarball will come with a version that will not depend on
> git and the Makefile should not change it.
> or do i miss something here?

Hmm...  Dirk's call?


Cheers,

-- 
Cristian


More information about the subsurface mailing list