mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
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.
This commit is contained in:
parent
07c95ebf0c
commit
704928a807
12
Makefile.am
12
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
|
||||
|
36
configure.ac
36
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 ""
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user