summaryrefslogtreecommitdiffstats
path: root/share/mk/dist/check/tar.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--share/mk/dist/check/tar.mk32
1 files changed, 32 insertions, 0 deletions
diff --git a/share/mk/dist/check/tar.mk b/share/mk/dist/check/tar.mk
new file mode 100644
index 0000000..bd28ce5
--- /dev/null
+++ b/share/mk/dist/check/tar.mk
@@ -0,0 +1,32 @@
+# Copyright 2024, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
+
+
+ifndef MAKEFILE_DIST_CHECK_TAR_INCLUDED
+MAKEFILE_DIST_CHECK_TAR_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk
+include $(MAKEFILEDIR)/configure/build-depends/tar.mk
+include $(MAKEFILEDIR)/configure/version.mk
+include $(MAKEFILEDIR)/dist/check/_.mk
+include $(MAKEFILEDIR)/dist/tar.mk
+
+
+$(_DISTCHECKDIR)/$(DISTFILE): $(_DISTFILE) $(MK) | $$(@D)/
+ $(info $(INFO_)CP $@)
+ $(CP) -T $< $@
+
+$(_DISTCHECKSRCDIR): %: %.tar $(MK) | $$(@D)/
+ $(info $(INFO_)TAR xf $<)
+ $(RM) -rf $@
+ cd $(dir $<) \
+ && $(TAR) xf $(notdir $<)
+ $(TOUCH) $@
+
+
+.PHONY: distcheck-tar
+distcheck-tar: $(_DISTCHECKSRCDIR);
+
+
+endif # include guard