[PATCH evemu v2 3/4] configure.ac: add '--disable-python-bindings' option

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 11 17:22:35 PDT 2014


On Mon, Aug 11, 2014 at 10:26:09PM +0200, Peter Seiderer wrote:
> Needed for target systems without python support.
> 
> Signed-off-by: Peter Seiderer <ps.report at gmx.net>
> 
> ---
> Changes v1 -> v2:
>   - use BUILD_PYTHON_BINDINGS conditional (as suggested by Peter Hutterer)
> ---
>  configure.ac             | 10 ++++++++++
>  python/Makefile.am       |  2 ++
>  python/evemu/Makefile.am |  3 +++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 372a5ec..cc6d786 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([python-bindings],
> +	AS_HELP_STRING([--disable-python-bindings], [disable generation of python bindings]),
> +	[case "${enableval}" in
> +	  yes) python_bindings=true ;;
> +	  no)  python_bindings=false ;;
> +	  *) AC_MSG_ERROR([bad value ${enableval} for --disable-python-bindings]) ;;
> +	esac],[python_bindings=true])
> +
> +AM_CONDITIONAL(BUILD_PYTHON_BINDINGS, [test "x$python_bindings" = "xtrue"])
> +
>  AC_ARG_ENABLE([tests],
>  	AS_HELP_STRING([--disable-tests], [disable building of tests]),
>  	[case "${enableval}" in
> diff --git a/python/Makefile.am b/python/Makefile.am
> index a31ee98..b1bca19 100644
> --- a/python/Makefile.am
> +++ b/python/Makefile.am
> @@ -18,8 +18,10 @@
>  
>  SUBDIRS = evemu
>  
> +if BUILD_PYTHON_BINDINGS
>  nobase_python_PYTHON = \
>  	$(wildcard evemu/*.py)
> +endif

don't you need to wrap this around the other stuff here too? looks like
you're still building the test runner and make check would fail if the
python bindings are disabled.

Cheers,
   Peter

>  
>  if BUILD_TESTS
>  check_SCRIPTS = evemu-test-runner
> diff --git a/python/evemu/Makefile.am b/python/evemu/Makefile.am
> index 17b1462..e252635 100644
> --- a/python/evemu/Makefile.am
> +++ b/python/evemu/Makefile.am
> @@ -1,6 +1,9 @@
> +if BUILD_PYTHON_BINDINGS
>  event_names.py: Makefile make-event-names.py
>  	$(PYTHON) $(srcdir)/make-event-names.py > $@
>  
>  BUILT_SOURCES = event_names.py
> +endif
> +
>  CLEANFILES = event_names.py event_names.pyc
>  EXTRA_DIST = make-event-names.py
> -- 
> 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