summaryrefslogtreecommitdiffstats
path: root/share/mk/dist/check/tar.mk
blob: 33f4cb0b7df90dd75d966b67baf479b9e95e4e68 (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
33
34
# 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/cp.mk
include $(MAKEFILEDIR)/configure/build-depends/coreutils/rm.mk
include $(MAKEFILEDIR)/configure/build-depends/coreutils/touch.mk
include $(MAKEFILEDIR)/configure/build-depends/tar/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