mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
4838deab65
commit
0c8d339514
8
version-def.h.in
Normal file
8
version-def.h.in
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef VERSION_DEF_H
|
||||
#define VERSION_DEF_H
|
||||
|
||||
#define GIT_VERSION "@GIT_VERSION@"
|
||||
#define GIT_BUILT_FROM_COMMIT "@GIT_BUILT_FROM_COMMIT@"
|
||||
#define GIT_USER_AGENT "@GIT_USER_AGENT@"
|
||||
|
||||
#endif /* VERSION_DEF_H */
|
||||
Reference in New Issue
Block a user