]> git.pond.sub.org Git - empserver/commit
configure Make: More detailed version information
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 26 Jun 2016 09:36:04 +0000 (11:36 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:17 +0000 (20:09 +0200)
commit1ec9b94f7467fdd51462c6c22c40ecb14403ed3f
treef81ff423d53971c20f6bda4648f11e750cbc9e4a
parentdb055aa8bcbaea710543f168cd57f68a34681123
configure Make: More detailed version information

Version information is in output of commands version, xdump version,
and in program output for option -v.  Looks like this:

    Wolfpack Empire 4.3.33

The version number is defined in configure.ac, and incremented
manually.  It identifies only the base release (here: 4.3.33).  Fine
when this is an unmodified released version.  Pretty much useless
during development.

Add a suffix to the version number that describes it further:

    V               Unmodified release V (same as before)
    V.N-H           Modified release built from a clean git tree
                    N is the number of additional commits, and
                    H is the abbreviated commit hash
    V.N-H-dirty     Same, but the working tree is dirty
    V-dirty         Modified release built from a tarball

A git tree is clean when the contents of its files are unchanged.
Changing only the their timestamps doesn't count.  It does count when
building from a tarball, because tracking contents isn't implemented
there.

Also use this suffixed version for tarball names.

The version reported by configure is fixed at configure generation
time, i.e. it is usually out of date during development.  Ensuring a
release tarball contains one with a current version is manual for now.
Running autoconf -f should do the trick.

Elsewhere, the version is determined at build time, so it is always
current.

Dirty tracking isn't implemented in the standalone client build.  If
you start with a clean tarball, the version will not change from V to
V-dirty when you build with modifications.

Steal build-aux/git-version-gen from autoconf 2.69 to help with
computing the version string.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Make.mk
build-aux/git-version-gen [new file with mode: 0755]
configure.ac
src/client/configure.ac
src/lib/global/version.c
src/scripts/tarball
tests/normalize.pl