[beast] BUILD: use DISTCHECK_CONFIGURE_FLAGS to create test report after installcheck
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] BUILD: use DISTCHECK_CONFIGURE_FLAGS to create test report after installcheck
- Date: Tue, 31 Aug 2010 01:58:50 +0000 (UTC)
commit df237fed8ae2f4ecb2dbde02d86b006464a194b5
Author: Tim Janik <timj gtk org>
Date: Tue Aug 31 03:47:26 2010 +0200
BUILD: use DISTCHECK_CONFIGURE_FLAGS to create test report after installcheck
Makefile.am | 64 +++++++--------------------------------------------------
configure.in | 6 +++++
2 files changed, 14 insertions(+), 56 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d9b8958..60df0ad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,62 +73,14 @@ clean_filter = $(strip \
#distcleancheck_listfiles = find . -type f -print # original automake-1.11 setting
distcleancheck_listfiles = find . -type f $(patsubst ./%, ! -path \*/%, $(clean_filter)) -print
-# extend automake-1.11 distcheck rule to make report.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
- *.tar.xz*) \
- xz -dc $(distdir).tar.xz | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- test -d $(distdir)/_build || exit 0; \
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) report \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
- && cd "$$am__cwd" \
- || exit 1
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+# run 'make report' after installcheck from distcheck
+DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck-tests
+INSTALLCHECK_HOOK = installcheck # use indirection to emulate installcheck-hook
+$(INSTALLCHECK_HOOK): costly-distcheck-tests
+costly-distcheck-tests:
+ @case "$(BEAST_BUILD)" in *:distcheck-tests:*) $(MAKE) report ;; esac
+.PHONY: costly-distcheck-tests
+
# remove non-distributed po files from distributed POTFILES.in
dist-hook:
sed 's,^\(drivers/\),# \1,' < $(distdir)/po/POTFILES.in > $(distdir)/po/POTFILES.tmp
diff --git a/configure.in b/configure.in
index 6e4e5c5..d102ee2 100644
--- a/configure.in
+++ b/configure.in
@@ -83,9 +83,15 @@ AM_MAINTAINER_MODE
# declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug, [ --enable-debug=no/minimum/yes turn on debugging],,enable_debug=$debug_default)
AC_ARG_ENABLE(toyprof, [ --enable-toyprof turn on toy profiler, see sfi/toyprof.README],,)
+AC_ARG_ENABLE(distcheck-tests, [ --enable-distcheck-tests turn on resource and time consuming distcheck tests],,enable_distcheck_tests=no)
AC_ARG_WITH(doxer, [ --with-doxer=[no/yes] build documentation with doxer documentation tool], [DOXRULE=''], [DOXRULE='#'])
AC_SUBST(DOXRULE)
+# BEAST_BUILD configuration
+BEAST_BUILD="$BEAST_BUILD"
+test "$enable_distcheck_tests" = yes && BEAST_BUILD=":distcheck-tests:$BEAST_BUILD"
+AC_SUBST(BEAST_BUILD)
+
dnl # setup DEBUG defaults
if test "x$enable_debug" = "xyes"; then
DEBUG_FLAGS="-g -DG_ENABLE_DEBUG"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]