summaryrefslogtreecommitdiffstats
path: root/version.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 14:24:39 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-06 23:52:08 +0100
commit0c8d33951400f7d7175e1dad51e970fb70849f2b (patch)
treef3d40e1e433824b1c1b211e3943642c553240966 /version.c
parentMakefile: refactor GIT-VERSION-GEN to be reusable (diff)
downloadgit-0c8d33951400f7d7175e1dad51e970fb70849f2b.tar.xz
git-0c8d33951400f7d7175e1dad51e970fb70849f2b.zip
Makefile: propagate Git version via generated header
We set up a couple of preprocessor macros when compiling Git that propagate the version that Git was built from to `git version` et al. The way this is set up makes it harder than necessary to reuse the infrastructure across the different build systems. Refactor this such that we generate a "version-def.h" header via `GIT-VERSION-GEN` instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'version.c')
-rw-r--r--version.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/version.c b/version.c
index 41b718c29e..7adc4d51ff 100644
--- a/version.c
+++ b/version.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "version.h"
+#include "version-def.h"
#include "strbuf.h"
const char git_version_string[] = GIT_VERSION;