[clutter] build: Allow disabling all tests and examples
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] build: Allow disabling all tests and examples
- Date: Tue, 1 May 2012 18:12:12 +0000 (UTC)
commit 704928a807a3b17029d092eef2b24c76ab7c7890
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue May 1 18:51:19 2012 +0100
build: Allow disabling all tests and examples
This should allow nicer build automation and cross-compilation support.
The former --disable-conformance configure switch has been deprecated by
the --disable-tests one, which is more encompassing as it disables the
whole test suite.
Makefile.am | 12 +++++++++++-
configure.ac | 36 +++++++++++++++++++++++++-----------
tests/Makefile.am | 16 +---------------
3 files changed, 37 insertions(+), 27 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c8b3de9..e8cd0ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,17 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent
NULL =
-SUBDIRS = clutter tests examples doc po build
+SUBDIRS = clutter doc po build
+
+if BUILD_TESTS
+SUBDIRS += tests
+endif
+
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
+
+DIST_SUBDIRS = clutter tests examples doc po build
# XXX - this is a massive hack to make autoreconf honour the ACLOCAL_FLAGS
# that jhbuild sets while still retaining build/autotools as the authoritative
diff --git a/configure.ac b/configure.ac
index 18b7923..fe9bbf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -866,16 +866,6 @@ AS_CASE([$enable_deprecated],
AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
-dnl === Conformance test suite ================================================
-
-AC_ARG_ENABLE([conformance],
- [AS_HELP_STRING([--enable-conformance=@<:@no/yes@:>@],
- [Build conformance test suite @<:@default=yes@:>@])],
- [],
- [enable_conformance=yes])
-
-AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_conformance" = "xyes"])
-
dnl === Profiling =============================================================
m4_define([profile_default], [no])
@@ -1088,6 +1078,27 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
[The prefix for our gettext translation domains.])
AS_ALL_LINGUAS
+dnl = Build optionals =========================================================
+
+dnl === Conformance test suite ================================================
+
+AC_ARG_ENABLE([conformance],
+ [AS_HELP_STRING([--disable-conformance], [Whether the conformance tests should be built])],
+ [],
+ [enable_conformance=yes])
+
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--disable-tests], [Whether tests should be built])],
+ [],
+ [enable_tests=yes])
+AM_CONDITIONAL(BUILD_TESTS, [test "x$enable_tests" = "xyes" && "x$enable_conformance" = "xyes"])
+
+AC_ARG_ENABLE([examples],
+ [AS_HELP_STRING([--disable-examples], [Whether examples should be built])],
+ [],
+ [enable_examples=yes])
+AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = "xyes"])
+
dnl ===========================================================================
AC_CONFIG_FILES([
@@ -1170,9 +1181,12 @@ echo " Build Additional Documentation: ${enable_docs} (Generate PDF: ${en
echo ""
echo " â Extra:"
echo " Build introspection data: ${enable_introspection}"
-echo " Build conformance test suite: ${enable_conformance}"
+echo " Build test suites: ${enable_tests}"
+if test "x$enable_tests" = "xyes"; then
echo " Build X11-specific tests: ${x11_tests}"
echo " Build tests using GDK-Pixbuf: ${pixbuf_tests}"
+fi
+echo " Build examples: ${enable_examples}"
# Clutter backend related flags
echo ""
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9eeba79..48f2531 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,26 +1,12 @@
-SUBDIRS = accessibility data interactive micro-bench performance
-
-if BUILD_TESTS
-SUBDIRS += conform
-endif
-
-DIST_SUBDIRS = accessibility data conform interactive micro-bench performance
+SUBDIRS = accessibility data conform interactive micro-bench performance
EXTRA_DIST = README
-if BUILD_TESTS
test conform:
( cd ./conform && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $$?
test-report full-report:
( cd ./conform && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $$?
-else
-test conform:
- @true
-
-test-report full-report:
- @true
-endif # BUILD_TESTS
.PHONY: test conform test-report full-report
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]