aboutsummaryrefslogtreecommitdiff
path: root/mk/gitver.mk
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2014-12-05 11:55:16 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-12-05 11:55:45 -0600
commit7a92eb888794819a339babd0ee220b6aa3993db1 (patch)
tree62239457e7263506a0485903a47a71a8a5eccf0e /mk/gitver.mk
parent30cc3cdb76a66c7c0f89a52db4e5cff77b570e31 (diff)
rename git.mk to gitver.mk
This is a more descriptive name since this file only sets the gitver variable.
Diffstat (limited to 'mk/gitver.mk')
-rw-r--r--mk/gitver.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/mk/gitver.mk b/mk/gitver.mk
new file mode 100644
index 00000000..62cae5a4
--- /dev/null
+++ b/mk/gitver.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:= $(shell ${_GITVER_SH})
+GITVER= ${_GITVER}