slowly getting ready for 3.0

Linus Torvalds torvalds at linux-foundation.org
Thu Jan 24 14:02:33 PST 2013


On Thu, Jan 24, 2013 at 1:42 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> Which reminds me - someone with better Makefile foo than I have could do
> me a favor and create a rule that allows us to have the git SHA as part
> of the version number of any non-release build - so that the About
> window would clearly show you you are running a development version.

Something like the appended should trivially work.

If it is compiled at the exact location of the tag, "git describe
--tags" will just return the tag-name. Otherwise it will return
something like this

    v2.1-393-ge03f31525aab

which means "v2.1 plus 393 commits, git SHA1 of tip is e03f31525aab",
which is a nice combination of git-readable (only the actual SHA1
matters) and human-readable (393 commits on top of v2.1).

And if you don't build from git sources, and don't have git installed,
it falls back on the old "v$(VERSION)" string.

See if it works for you. Consider it signed-off from me if it does. I
do *not* know how well this works under windows etc, but we already do
that $(shell..) thing for the C compiler version, so it can't be
totally broken. Can it?

                  Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 944 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130124/dc241b82/attachment.obj>


More information about the subsurface mailing list