From 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:07 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- share/mk/dist/check/_.mk | 41 +++++++++++++++++++++++++++++++++++++++ share/mk/dist/check/diffoscope.mk | 26 +++++++++++++++++++++++++ share/mk/dist/check/dist.mk | 28 ++++++++++++++++++++++++++ share/mk/dist/check/tar.mk | 32 ++++++++++++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 share/mk/dist/check/_.mk create mode 100644 share/mk/dist/check/diffoscope.mk create mode 100644 share/mk/dist/check/dist.mk create mode 100644 share/mk/dist/check/tar.mk (limited to 'share/mk/dist/check') diff --git a/share/mk/dist/check/_.mk b/share/mk/dist/check/_.mk new file mode 100644 index 0000000..a24b8f8 --- /dev/null +++ b/share/mk/dist/check/_.mk @@ -0,0 +1,41 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_DIST_CHECK_INCLUDED +MAKEFILE_DIST_CHECK_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/directory_variables.mk +include $(MAKEFILEDIR)/configure/version.mk + + +_DISTCHECKDIR := $(shell $(REALPATH) -m $(builddir)/distcheck) +_DISTCHECKSRCDIR := $(_DISTCHECKDIR)/$(DISTNAME) +_DISTCHECKBUILDDIR := $(_DISTCHECKDIR)/$(DISTNAME)_builddir +_DISTCHECKDESTDIR := $(_DISTCHECKDIR)/$(DISTNAME)_destdir +_DISTCHECK_MANDIR := $(_DISTCHECKBUILDDIR)/man + + +_MAKE_OPTS = \ + -C $< \ + 'builddir=$(_DISTCHECKBUILDDIR)' \ + 'DESTDIR=$(_DISTCHECKDESTDIR)' + + +distcheck-%: $(_DISTCHECKSRCDIR) $(MK) | $$(@D)/ + $(info $(INFO_)MAKE $@) + $(MAKE) $(_MAKE_OPTS) $* \ + 'INFO_= $*: ' + + +.PHONY: distcheck +distcheck: distcheck-diffoscope +distcheck: $(_DISTCHECKSRCDIR) $(MK) + $(info $(INFO_)MAKE lint build check install dist) + $(MAKE) $(_MAKE_OPTS) lint build check install dist \ + 'INFO_= distcheck: ' + + +endif # include guard diff --git a/share/mk/dist/check/diffoscope.mk b/share/mk/dist/check/diffoscope.mk new file mode 100644 index 0000000..33bcf30 --- /dev/null +++ b/share/mk/dist/check/diffoscope.mk @@ -0,0 +1,26 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_DIST_CHECK_DIFFOSCOPE_INCLUDED +MAKEFILE_DIST_CHECK_DIFFOSCOPE_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/coreutils.mk +include $(MAKEFILEDIR)/configure/build-depends/diffoscope.mk +include $(MAKEFILEDIR)/configure/directory_variables.mk +include $(MAKEFILEDIR)/dist/check/dist.mk +include $(MAKEFILEDIR)/dist/tar.mk + + +$(builddir)/distcheck.diffoscope.touch: $(_DISTFILE) $(REDIST) | $$(@D)/ + $(info $(INFO_)DIFFOSCOPE $^) + $(DIFFOSCOPE) $^ + $(TOUCH) $@ + + +.PHONY: distcheck-diffoscope +distcheck-diffoscope: $(builddir)/distcheck.diffoscope.touch; + + +endif # include guard diff --git a/share/mk/dist/check/dist.mk b/share/mk/dist/check/dist.mk new file mode 100644 index 0000000..ecd565b --- /dev/null +++ b/share/mk/dist/check/dist.mk @@ -0,0 +1,28 @@ +# Copyright 2024, Alejandro Colomar +# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception + + +ifndef MAKEFILE_DIST_CHECK_DIST_INCLUDED +MAKEFILE_DIST_CHECK_DIST_INCLUDED := 1 + + +include $(MAKEFILEDIR)/configure/build-depends/sed.mk +include $(MAKEFILEDIR)/configure/version.mk +include $(MAKEFILEDIR)/dist/check/_.mk +include $(MAKEFILEDIR)/dist/check/tar.mk + + +REDIST := $(_DISTCHECKBUILDDIR)/$(DISTNAME).tar + + +$(REDIST): $(_DISTCHECKSRCDIR) $(MK) | $$(@D)/ + $(info $(INFO_)MAKE dist-tar) + $(MAKE) $(_MAKE_OPTS) dist-tar \ + 'INFO_= dist-tar: ' + + +.PHONY: distcheck-dist-tar +distcheck-dist-tar: $(REDIST); + + +endif # include guard 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 +# 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 -- cgit v1.2.3