aboutsummaryrefslogtreecommitdiff
path: root/mk/git.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/git.mk')
-rw-r--r--mk/git.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/mk/git.mk b/mk/git.mk
new file mode 100644
index 00000000..54a98ef4
--- /dev/null
+++ b/mk/git.mk
@@ -0,0 +1,8 @@
+_GITVER_SH= if git rev-parse --short HEAD >/dev/null 2>&1; then \
+ printf "."; \
+ git rev-parse --short HEAD; \
+ else \
+ echo ""; \
+ fi
+_GITVER!= ${_GITVER_SH}
+GITVER= ${_GITVER}$(shell ${_GITVER_SH})