Commit 0d0503b2 authored by Iustin Pop's avatar Iustin Pop
Browse files

Improve the dist build rule

This changes the 'dist' rule to also do a check that the archive can
build all the programs and passes the check test itself, and shows the
sha1sum at the end automatically.
parent 1901266d
......@@ -62,6 +62,7 @@ Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
sed -e "s/%ver%/$$(cat version)/" < $< > $@
dist: regen-version Ganeti/HTools/Version.hs doc
set -e ; \
VN=$$(cat version|sed 's/^v//') ; \
PFX="ganeti-htools-$$VN" ; \
ANAME="$$PFX.tar" ; \
......@@ -70,7 +71,13 @@ dist: regen-version Ganeti/HTools/Version.hs doc
tar -r -f $$ANAME --owner root --group root \
--transform="s,^,$$PFX/," version apidoc $(DOCS) ; \
gzip -v9 $$ANAME ; \
tar tzvf $$ANAME.gz
TMPDIR=$$(mktemp -d) ; \
tar xzf $$ANAME.gz -C $$TMPDIR; \
(cd $$TMPDIR/$$PFX; make; make clean; make check); \
rm -rf $$TMPDIR ; \
tar tzvf $$ANAME.gz ; \
sha1sum $$ANAME.gz ; \
echo "Archive $$ANAME.gz created."
check: test
rm -f *.tix *.mix
......
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