diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-12-20 20:44:23 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-20 21:36:45 +0100 |
commit | 114494ae2c6f473dd9c9745a9b4fc6c55b70f2e8 (patch) | |
tree | 27b284e98152f860c8f34694f204a0a46fb23e6a /shared.mak | |
parent | Makefile: drop unneeded indirection for GIT-VERSION-GEN outputs (diff) | |
download | git-114494ae2c6f473dd9c9745a9b4fc6c55b70f2e8.tar.xz git-114494ae2c6f473dd9c9745a9b4fc6c55b70f2e8.zip |
Makefile: introduce template for GIT-VERSION-GEN
Introduce a new template to call GIT-VERSION-GEN. This will allow us to
iterate on how exactly the script is called in subsequent commits
without having to adapt all call sites every time.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shared.mak')
-rw-r--r-- | shared.mak | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shared.mak b/shared.mak index 29bebd30d8..b23c5505c9 100644 --- a/shared.mak +++ b/shared.mak @@ -116,3 +116,11 @@ endef define libpath_template -L$(1) $(if $(filter-out -L,$(CC_LD_DYNPATH)),$(CC_LD_DYNPATH)$(1)) endef + +# Populate build information into a file via GIT-VERSION-GEN. Requires the +# absolute path to the root source directory as well as input and output files +# as arguments, in that order. +define version_gen +GIT_USER_AGENT="$(GIT_USER_AGENT)" \ +$(SHELL_PATH) "$(1)/GIT-VERSION-GEN" "$(1)" "$(2)" "$(3)" +endef |