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>
This commit is contained in:

committed by
Junio C Hamano

parent
b329f2eb00
commit
114494ae2c
@ -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
|
||||
|
Reference in New Issue
Block a user