[PATCH evemu v2 1/4] configure.ac: add '--disable-tests' option
Peter Hutterer
peter.hutterer at who-t.net
Mon Aug 11 17:19:44 PDT 2014
On Mon, Aug 11, 2014 at 10:26:07PM +0200, Peter Seiderer wrote:
> For toolchains without c++ support add option to disable
> tests, because this is the only place c++ is needed (to
> test the c++ binding).
>
> Signed-off-by: Peter Seiderer <ps.report at gmx.net>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
fwiw, I prefer xyes/xno instead of xtrue/xfalse but that's solely because
all other projects I work on use that terminology. Benjamin can decide which
way to go.
Cheers,
Peter
> ---
> Changes v1 -> v2:
> - use BUILD_TESTS conditional (as suggested by Peter Hutterer)
> ---
> configure.ac | 10 ++++++++++
> test/Makefile.am | 2 ++
> 2 files changed, 12 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index e222d8d..372a5ec 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -45,6 +45,16 @@ if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then
> AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
> fi
>
> +AC_ARG_ENABLE([tests],
> + AS_HELP_STRING([--disable-tests], [disable building of tests]),
> + [case "${enableval}" in
> + yes) tests=true ;;
> + no) tests=false ;;
> + *) AC_MSG_ERROR([bad value ${enableval} for --disable-tests]) ;;
> + esac],[tests=true])
> +
> +AM_CONDITIONAL(BUILD_TESTS, [test "x$tests" = "xtrue"])
> +
> AC_SUBST(AM_CFLAGS,
> "-Wall -Wextra")
>
> diff --git a/test/Makefile.am b/test/Makefile.am
> index 575a227..70152b4 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -1,3 +1,4 @@
> +if BUILD_TESTS
> noinst_PROGRAMS = test-c-compile test-cxx-compile test-evemu-create
> TESTS = $(noinst_PROGRAMS)
>
> @@ -12,5 +13,6 @@ test_cxx_compile_LDADD = $(top_builddir)/src/libevemu.la
> test_evemu_create_SOURCES = test-evemu-create.c
> test_evemu_create_LDADD = $(top_builddir)/src/libevemu.la
> test_evemu_create_LDFLAGS = -static
> +endif
>
> CLEANFILES = evemu.tmp.*
> --
> 1.8.1.4
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools
More information about the Input-tools
mailing list