summaryrefslogtreecommitdiffstats
path: root/mk/release.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:45:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:45:40 +0000
commit07d7f4cfa4b10de87a31b68191036ff446add675 (patch)
tree7162524d8aaf1aef62d2f4fa51f595ed113981ff /mk/release.mk
parentAdding upstream version 2.1.6. (diff)
downloadpacemaker-07d7f4cfa4b10de87a31b68191036ff446add675.tar.xz
pacemaker-07d7f4cfa4b10de87a31b68191036ff446add675.zip
Adding upstream version 2.1.7.upstream/2.1.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--mk/release.mk21
1 files changed, 12 insertions, 9 deletions
diff --git a/mk/release.mk b/mk/release.mk
index 7d7259c..b10bcf0 100644
--- a/mk/release.mk
+++ b/mk/release.mk
@@ -1,5 +1,5 @@
#
-# Copyright 2008-2022 the Pacemaker project contributors
+# Copyright 2008-2023 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
@@ -13,10 +13,12 @@ COMMIT ?= HEAD
# TAG defaults to DIST when in a source distribution instead of a git checkout,
# the tag name if COMMIT is tagged, and the full commit ID otherwise.
-TAG ?= $(shell \
- T=$$(git describe --tags --exact-match '$(COMMIT)' 2>/dev/null); \
- [ -n "$${T}" ] && echo "$${T}" \
- || git log --pretty=format:%H -n 1 '$(COMMIT)' 2>/dev/null \
+TAG ?= $(shell \
+ T=$$("$(GIT)" describe --tags --exact-match '$(COMMIT)' \
+ 2>/dev/null); \
+ [ -n "$${T}" ] && echo "$${T}" \
+ || "$(GIT)" log --pretty=format:%H -n 1 '$(COMMIT)' \
+ 2>/dev/null \
|| echo DIST)
# If DIRTY=anything is passed to make, generated versions will end in ".mod"
@@ -24,7 +26,8 @@ TAG ?= $(shell \
# default.
DIRTY_EXT = $(shell [ -n "$(DIRTY)" ] \
&& [ "$(COMMIT)" == "HEAD" ] \
- && ! git diff-index --quiet HEAD -- 2>/dev/null \
+ && ! "$(GIT)" diff-index --quiet HEAD -- \
+ 2>/dev/null \
&& echo .mod)
# These can be used in case statements to avoid make interpreting parentheses
@@ -32,14 +35,14 @@ lparen = (
rparen = )
# This will be empty if not in a git checkout
-CHECKOUT = $(shell git rev-parse --git-dir 2>/dev/null)
+CHECKOUT = $(shell "$(GIT)" rev-parse --git-dir 2>/dev/null)
# VERSION is set by configure, but we allow some make targets to be run without
# running configure first, so set a reasonable default in that case.
VERSION ?= $(shell if [ -z "$(CHECKOUT)" ]; then \
echo 0.0.0; \
else \
- git tag -l \
+ "$(GIT)" tag -l \
| sed -n -e 's/^\(Pacemaker-[0-9.]*\)$$/\1/p' \
| sort -Vr | head -n 1; \
fi)
@@ -83,5 +86,5 @@ top_distdir = $(PACKAGE)-$(shell \
Pacemaker-*$(rparen) \
echo '$(TAG)' | cut -c11-;; \
*$(rparen) \
- git log --pretty=format:%h -n 1 '$(TAG)';; \
+ "$(GIT)" log --pretty=format:%h -n 1 '$(TAG)';; \
esac)$(DIRTY_EXT)