From 0c8d33951400f7d7175e1dad51e970fb70849f2b Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 6 Dec 2024 14:24:39 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- version.c | 1 + 1 file changed, 1 insertion(+) (limited to 'version.c') 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; -- cgit v1.3