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>
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 \