Add new Makefile target to rebuild the whole dist
authorRené Nussbaumer <rn@google.com>
Wed, 8 Aug 2012 14:43:13 +0000 (16:43 +0200)
committerRené Nussbaumer <rn@google.com>
Thu, 9 Aug 2012 09:35:21 +0000 (11:35 +0200)
Due to the fact how the automake system works it doesn't rebuild already
prebuild files in distcheck. This lead to a bug, where a rebuild of the
documentation was failing because we missed the fact that the files were
missing from the archive.

By adding distrebuildcheck we workaround that issue by running a
maintainer-clean which also removes prebuild files.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

Makefile.am

index f0fd8a9..2e2b92f 100644 (file)
@@ -1406,6 +1406,19 @@ distcheck-hook:
 distcheck-release dist-release: export BUILD_RELEASE = 1
 distcheck-release: distcheck
 
+distrebuildcheck: dist
+       set -e; \
+       builddir=$$(mktemp -d $(abs_srcdir)/distrebuildcheck.XXXXXXX); \
+       trap "echo Removing $$builddir; cd $(abs_srcdir); rm -rf $$builddir" EXIT; \
+       cd $$builddir; \
+       tar xzf $(abs_srcdir)/$(distdir).tar.gz; \
+       cd $(distdir); \
+       ./configure; \
+       $(MAKE) maintainer-clean; \
+       cp $(abs_srcdir)/vcs-version .; \
+       ./configure; \
+       $(MAKE) $(AM_MAKEFLAGS)
+
 dist-release: dist
        set -e; \
        for i in $(DIST_ARCHIVES); do \