summaryrefslogtreecommitdiffstats
path: root/share/mk/version.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--share/mk/version.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/share/mk/version.mk b/share/mk/version.mk
new file mode 100644
index 0000000..af3c0cb
--- /dev/null
+++ b/share/mk/version.mk
@@ -0,0 +1,20 @@
+########################################################################
+# Copyright 2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_VERSION_INCLUDED
+MAKEFILE_VERSION_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/verbose.mk
+
+
+DISTNAME := $(shell $(GIT) describe $(HIDE_ERR))
+DISTVERSION := $(patsubst man-pages-%,%,$(DISTNAME))
+DISTDATE := $(shell $(GIT) log -1 --format='%aD')
+
+
+endif # include guard