summaryrefslogtreecommitdiffstats
path: root/share/mk/dist/check/tar.mk
blob: bd28ce56b34d7bcc258fb726adb97e7f97b81799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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