]> git.tuebingen.mpg.de Git - paraslash.git/commit
Fix git-version file creation.
authorAndre Noll <maan@systemlinux.org>
Tue, 22 Feb 2011 12:02:17 +0000 (13:02 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 5 Mar 2011 12:18:31 +0000 (13:18 +0100)
commitbe9f7c9b442f7b723427a79f85774d5fa7718425
tree1d7fd97eabb24dc66e8ce0a84827d8dd167f8d17
parent0b59e8c354f4ea0b322fa84d57b355c12c87823b
Fix git-version file creation.

ATM, this does not work well, since only the executables depend on
GIT-VERSION-FILE, but relinking these does not take into account the
new contents of GIT-VERSION-FILE. Hence a "make clean" is necessary
to produce executables that reports the correct version number.

This patch  changes GIT-VERSION-GEN so that it generates a preprocessor
define instead of setting a Makefile variable. This value is written
to stdout in any case and also to the file named "$1" if an argument
was given and the current git version differs from the contents of
this file (or if the file does not exist).

In order to not have to recompile everything on version changes,
the macros related to versioning are moved from para.h into the new
version.h file which is included only where necessary.

Makefile.in no longer uses phony targets to include the GIT_VERSION
variable. Instead we simply execute

$(shell ./GIT_VERSION_FILE version.h)

at the top of the Makefile.
16 files changed:
.gitignore
GIT-VERSION-GEN
Makefile.in
afh.c
audioc.c
audiod.c
client_common.c
command.c
fade.c
filter.c
gui.c
para.h
recv.c
server.c
version.h [new file with mode: 0644]
write.c