]> git.tuebingen.mpg.de Git - paraslash.git/commit
build: Revamp git versioning.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 1 Jan 2025 00:16:48 +0000 (01:16 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 25 Mar 2025 00:51:36 +0000 (01:51 +0100)
commit09ca227ad87eaa2a549cd438fc7d8a6ab4d35973
treed45106d742550d279885e9cc416f6721ed1bb3a5
parent8a74b53e48b4e68989dc2eeaa6fbb193c644af7e
build: Revamp git versioning.

This rewrites GIT-VERSION-GEN and renames it to version-gen.sh. The
main difference is that the script now generates version.c rather
than version.h, speeding up the build because switching branches
or transitioning from a clean to a dirty work-tree (or vice versa)
changes the version string. Before the patch, all files which included
version.h were recompiled. With the patch applied, only the short
version.c needs to be recompiled.

The generated version,c defines one function which returns the
single-line version string and a second function which returns
the multi-line version information (author, copyright, git URL
etc). This information is now passed to version-gen.sh via environment
variables. The CPP macros we had before are removed.
.gitignore
GIT-VERSION-GEN [deleted file]
Makefile.real
configure.ac
m4/lls/copyright.m4
string.c
string.h
version-gen.sh [new file with mode: 0755]