From af1213a7ae9b2f15aebae5682a96c23cd8862f28 Mon Sep 17 00:00:00 2001 From: thorkill Date: Sun, 26 Jul 2015 12:22:22 +0200 Subject: [PATCH] Revert "Do not recompile version if not needed" This reverts commit 529576dad616b22d883ad17ac7d9c088de31e707. This feature works only with gmake, BSD systems do not have it and we do not want to force users to install it. --- src/Makefile.am | 5 ++++- src/version_git.mak | 9 --------- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 src/version_git.mak diff --git a/src/Makefile.am b/src/Makefile.am index 7379e265..bcffbf29 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,10 @@ sbin_PROGRAMS = tincd tinc sptps_test sptps_keypair ## Make sure version.c is always rebuilt with the latest git information -$(eval include version_git.mak) +.PHONY: ${srcdir}/version.c version_git.h +version_git.h: + echo >$@ + -(cd $(srcdir) && git describe) && echo '#define GIT_DESCRIPTION "'`(cd $(srcdir) && git describe) | sed 's/release-//'`'"' >$@ ${srcdir}/version.c: version_git.h if LINUX diff --git a/src/version_git.mak b/src/version_git.mak deleted file mode 100644 index f4dfecf8..00000000 --- a/src/version_git.mak +++ /dev/null @@ -1,9 +0,0 @@ -gitdescription_new=$(shell git describe | sed 's/^release-//') -gitdescription_old=$(shell sed 's/.*"\(.*\)".*/\1/' version_git.h) - -ifneq ($(gitdescription_new), $(gitdescription_old)) -version_git.h: - echo $(gitdescription_new) - echo $(gitdescription_old) - echo '#define GIT_DESCRIPTION "$(gitdescription_new)"' >$@ -endif