summaryrefslogtreecommitdiffstats
path: root/share/mk/configure/version.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/configure/version.mk')
-rw-r--r--share/mk/configure/version.mk43
1 files changed, 43 insertions, 0 deletions
diff --git a/share/mk/configure/version.mk b/share/mk/configure/version.mk
new file mode 100644
index 0000000..cc89bae
--- /dev/null
+++ b/share/mk/configure/version.mk
@@ -0,0 +1,43 @@
+# Copyright 2022-2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_CONFIGURE_VERSION_INCLUDED
+MAKEFILE_CONFIGURE_VERSION_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
+include $(MAKEFILEDIR)/configure/build-depends/findutils.mk
+include $(MAKEFILEDIR)/configure/build-depends/git.mk
+include $(MAKEFILEDIR)/configure/build-depends/grep.mk
+include $(MAKEFILEDIR)/configure/verbose.mk
+
+
+DISTNAME := man-pages-6.7
+DISTVERSION := 6.7
+
+
+DISTFILESCMD := \
+ $(FIND) $(srcdir) -not -type d \
+ | $(GREP) -v '^$(srcdir)/.git$$' \
+ | $(GREP) -v '^$(srcdir)/.git/' \
+ | $(GREP) -v '^$(srcdir)/.tmp/' \
+ | $(GREP) -v '^$(srcdir)/.checkpatch-camelcase.' \
+ | $(SORT)
+
+DISTDATECMD := \
+ $(ECHO) '$(DISTVERSION)' \
+ | if $(GREP) -- '-dirty$$' >/dev/null; then \
+ $(DISTFILESCMD) \
+ | $(XARGS) $(STAT) -c %y \
+ | $(SORT) -n \
+ | $(TAIL) -n1; \
+ else \
+ $(GIT) log -1 --format='%cD'; \
+ fi;
+
+
+DISTDATE := Tue, 19 Mar 2024 19:07:13 +0100
+
+
+endif # include guard