Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,7 @@ Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version ...@@ -62,6 +62,7 @@ Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
sed -e "s/%ver%/$$(cat version)/" < $< > $@ sed -e "s/%ver%/$$(cat version)/" < $< > $@
dist: regen-version Ganeti/HTools/Version.hs doc dist: regen-version Ganeti/HTools/Version.hs doc
set -e ; \
VN=$$(cat version|sed 's/^v//') ; \ VN=$$(cat version|sed 's/^v//') ; \
PFX="ganeti-htools-$$VN" ; \ PFX="ganeti-htools-$$VN" ; \
ANAME="$$PFX.tar" ; \ ANAME="$$PFX.tar" ; \
...@@ -70,7 +71,13 @@ dist: regen-version Ganeti/HTools/Version.hs doc ...@@ -70,7 +71,13 @@ dist: regen-version Ganeti/HTools/Version.hs doc
tar -r -f $$ANAME --owner root --group root \ tar -r -f $$ANAME --owner root --group root \
--transform="s,^,$$PFX/," version apidoc $(DOCS) ; \ --transform="s,^,$$PFX/," version apidoc $(DOCS) ; \
gzip -v9 $$ANAME ; \ 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 check: test
rm -f *.tix *.mix rm -f *.tix *.mix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment