Commit d9f02980 authored by Iustin Pop's avatar Iustin Pop

Fix dist archive generation

As reported in issue 140, the timestamps of the generated files can be
older than the commit timestamp, leading to needless rebuilds of man
pages and such. Furthermore, with the man pages not built, it
currently fails, as there is no dependency on them.

Therefore, we change the ‘dist’ rule so that it forces a
maintainer-clean and then explicitly rebuilds the needed targets, so
that we have up-to-date timestamps.

Last, we also ship the HTML versions of the man pages.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 39420403
......@@ -54,6 +54,7 @@ doc: $(DOCS) Ganeti/HTools/Version.hs
maintainer-clean:
rm -rf $(HDDIR)
rm -f $(DOCS) TAGS version Ganeti/HTools/Version.hs
rm -f $(MANS) $(MANHTML)
clean:
rm -f $(HALLPROGS)
......@@ -76,7 +77,10 @@ version:
Ganeti/HTools/Version.hs: Ganeti/HTools/Version.hs.in version
sed -e "s/%ver%/$$(cat version)/" < $< > $@
dist: regen-version Ganeti/HTools/Version.hs doc
dist:
$(MAKE) maintainer-clean
$(MAKE) regen-version Ganeti/HTools/Version.hs doc
$(MAKE) man
set -e ; \
VN=$$(sed 's/^v//' < version) ; \
PFX="ganeti-htools-$$VN" ; \
......@@ -84,7 +88,8 @@ dist: regen-version Ganeti/HTools/Version.hs doc
rm -f $$ANAME $$ANAME.gz ; \
git archive --format=tar --prefix=$$PFX/ HEAD > $$ANAME ; \
tar -r -f $$ANAME --owner root --group root \
--transform="s,^,$$PFX/,S" version apidoc $(DOCS) $(MANS); \
--transform="s,^,$$PFX/,S" version apidoc \
$(DOCS) $(MANS) $(MANHTML); \
gzip -v9 $$ANAME ; \
TMPDIR=$$(mktemp -d) ; \
tar xzf $$ANAME.gz -C $$TMPDIR; \
......
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