[PATCH libevdev] doxygen: require a doxygen package minimum version for better docs

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 26 14:08:35 PST 2013


On Tue, Nov 26, 2013 at 10:30:56AM -0500, Gaetan Nadon wrote:
> The libevdev.css style sheet is not picked-up by doxygen at versions prior
> to 1.8.2. This makes the docs look pretty bad.

they'd be just using the default stylesheet, right?
if so, that's not terminal and we shouldn't fail (e.g. RHEL6 ships with
1.6.1 but building the documentation should work locally).

That's just for the maintainer to check that they have a modern enough
version so they upload something semi-nice looking.

so, thanks, but I'll skip this one. may need it in the future though, if
we use features that are more vital.

Cheers,
   Peter

> 
> The HTML_EXTRA_STYLESHEET tag feature has been introduced in version 1.8.2.
> 
> This patch provides a macro to check for the presence of doxygen and an
> optional minimum version.
> 
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
> 
> Feel free to change the minimum version number, or remove the parameter altogether
> 
>  configure.ac     |    9 +--------
>  m4/ev_doxygen.m4 |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 51 insertions(+), 8 deletions(-)
>  create mode 100644 m4/ev_doxygen.m4
> 
> diff --git a/configure.ac b/configure.ac
> index 2e53d95..f115f6e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -91,14 +91,7 @@ if test "x$GCC" = "xyes"; then
>  fi
>  AC_SUBST([GCC_CFLAGS], $with_cflags)
>  
> -AC_PATH_PROG(DOXYGEN, [doxygen])
> -if test "x$DOXYGEN" = "x"; then
> -	AC_MSG_WARN([doxygen not found - required for documentation])
> -	have_doxygen="no"
> -else
> -	have_doxygen="yes"
> -fi
> -AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = "xyes"])
> +EV_DOXYGEN([1.8.2])
>  
>  AC_MSG_CHECKING([whether to build with gcov])
>  AC_ARG_ENABLE([gcov],
> diff --git a/m4/ev_doxygen.m4 b/m4/ev_doxygen.m4
> new file mode 100644
> index 0000000..84754a2
> --- /dev/null
> +++ b/m4/ev_doxygen.m4
> @@ -0,0 +1,50 @@
> +# ===========================================================================
> +#     http://cgit.freedesktop.org/libevdev/tree/m4/ev_doxygen.m4
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   EV_DOXYGEN([min_version])
> +#
> +# DESCRIPTION
> +#
> +#   Configures the use of the doxygen documentation system to meet the libevdev
> +#   requirements. This is project specific and is not intended to be generally
> +#   reused.
> +#
> +# PUBLIC INTERFACE
> +#
> +#   HAVE_DOXYGEN: an Automake conditional variable for documentation building
> +#   have_doxygen: yes|no
> +#
> +
> +#serial 1
> +
> +AC_DEFUN([EV_DOXYGEN],[
> +
> +  AC_PATH_PROG([DOXYGEN], [doxygen])
> +  have_doxygen=no
> +  if test -n "$DOXYGEN" ; then
> +    # scrape the doxygen version
> +    AC_MSG_CHECKING([for doxygen version])
> +    installed_version=`$DOXYGEN --version 2>/dev/null`
> +    AC_MSG_RESULT([$installed_version])
> +    # is the installed version >= required minimum version
> +    if test -n "$installed_version" ; then
> +      have_doxygen=no
> +      m4_ifval([$1],
> +       [AS_VERSION_COMPARE([$installed_version], [$1],
> +            [have_doxygen=no],
> +            [have_doxygen=yes],
> +            [have_doxygen=yes])
> +       ])
> +    else
> +      AC_MSG_WARN([doxygen version not found - required for documentation])
> +    fi
> +  else
> +    AC_MSG_WARN([doxygen not found - required for documentation])
> +  fi
> +
> +AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = xyes])
> +
> +]) # EV_DOXYGEN
> -- 
> 1.7.9.5
> 
> _______________________________________________
> 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