From 9bb10d27e7072cec919d38f0b987c70e598039ad Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 6 Dec 2024 14:24:40 +0100 Subject: Makefile: generate "git.rc" via GIT-VERSION-GEN The "git.rc" is used on Windows to embed information like the project name and version into the resulting executables. As such we need to inject the version information, which we do by using preprocessor defines. The logic to do so is non-trivial and needs to be kept in sync with the different build systems. Refactor the logic so that we generate "git.rc" via `GIT-VERSION-GEN`. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- GIT-VERSION-GEN | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'GIT-VERSION-GEN') diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index c18f24e515..a1c8146f05 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -58,14 +58,18 @@ then GIT_USER_AGENT="git/$GIT_VERSION" fi -read GIT_MAJOR_VERSION GIT_MINOR_VERSION GIT_MICRO_VERSION trailing <"$OUTPUT"+ -- cgit v1.2.3