Commit e4422490 authored by Agustin Martin Domingo's avatar Agustin Martin Domingo

Makefile.maint: New tarball+sums target to calculate hashsums after creating the tarball.

Signed-off-by: default avatarAgustin Martin Domingo <agmartin@debian.org>
parent b603cfb4
......@@ -30,15 +30,25 @@ COPYING: Makefile.maint linuxdoc-tools.copyright sgmls-1.1/LICENSE iso-entities/
tarball: VERSION = $(shell cat VERSION)
tarball: GIT_STATUS = $(shell git status --porcelain)
tarball: TARBALL = ../linuxdoc-tools-$(VERSION).tar.gz
tarball:
$(if $(wildcard ../linuxdoc-tools-$(VERSION).tar.gz), \
$(error "../linuxdoc-tools-$(VERSION).tar.gz tarball already exists. Skipping"))
@if test -z "$(GIT_STATUS)"; then \
git archive --format tar.gz \
--prefix linuxdoc-tools-$(VERSION)/ \
--output ../linuxdoc-tools-$(VERSION).tar.gz HEAD; \
--output $(TARBALL) HEAD; \
else echo "$(GIT_STATUS)"; fi
tarball+sums: VERSION = $(shell cat VERSION)
tarball+sums: TARBALL = linuxdoc-tools-$(VERSION).tar.gz
tarball+sums: tarball
( cd .. && ( \
[ -z "`which md5sum`" ] || md5sum $(TARBALL); \
[ -z "`which sha1sum`" ] || sha1sum $(TARBALL); \
[ -z "`which sha256sum`" ] || sha256sum $(TARBALL); \
[ -z "`which sha512sum`" ] || sha512sum $(TARBALL); ))
# Local Variables:
# mode: makefile
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment