From d9f0298025f752ab1206ee19969bcd0983ba074b Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 14 Feb 2011 11:47:28 +0100 Subject: [PATCH] Fix dist archive generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Iustin Pop Reviewed-by: Michael Hanselmann --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6dcbe43..c02decb 100644 --- a/Makefile +++ b/Makefile @@ -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; \ -- 1.7.10.4