Re: [libgpiod] [PATCH 2/5] doc: Use autotoolized Doxyfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 8, 2020 at 12:00 PM Alexander Stein
<alexander.stein@xxxxxxxxxxx> wrote:
>
> This has several advantages:
> * More simplified Makefile.am
> * Actually used doxygen config is available as a file
> * Building doc out-of-tree is possible
>
> Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxx>
> ---
>  .gitignore              | 1 +
>  Doxyfile => Doxyfile.in | 3 ++-
>  Makefile.am             | 4 +---
>  configure.ac            | 1 +
>  4 files changed, 5 insertions(+), 4 deletions(-)
>  rename Doxyfile => Doxyfile.in (95%)
>
> diff --git a/.gitignore b/.gitignore
> index 488d9d6..a77efde 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -10,6 +10,7 @@ doc
>  # autotools stuff
>  .deps/
>  .libs/
> +Doxyfile
>  Makefile
>  Makefile.in
>  aclocal.m4
> diff --git a/Doxyfile b/Doxyfile.in
> similarity index 95%
> rename from Doxyfile
> rename to Doxyfile.in
> index b194095..8c6d591 100644
> --- a/Doxyfile
> +++ b/Doxyfile.in
> @@ -10,6 +10,7 @@
>
>  # General configuration
>  PROJECT_NAME           = libgpiod
> +PROJECT_NUMBER         = @VERSION_STR@
>  OUTPUT_DIRECTORY       = doc
>  OUTPUT_LANGUAGE        = English
>  EXTRACT_ALL            = NO
> @@ -48,7 +49,7 @@ WARNINGS               = YES
>  WARN_IF_UNDOCUMENTED   = YES
>  WARN_FORMAT            =
>  WARN_LOGFILE           =
> -INPUT                  = include/gpiod.h
> +INPUT                  = @top_srcdir@/include/gpiod.h @top_srcdir@/bindings/cxx/gpiod.hpp
>  SOURCE_BROWSER         = YES
>  INLINE_SOURCES         = NO
>  REFERENCED_BY_RELATION = YES
> diff --git a/Makefile.am b/Makefile.am
> index d3f57b2..72e6a25 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -29,9 +29,7 @@ SUBDIRS += bindings
>  if HAS_DOXYGEN
>
>  doc:
> -       @(cat Doxyfile; \
> -               echo PROJECT_NUMBER = $(VERSION_STR); \
> -               echo INPUT += bindings/cxx/gpiod.hpp) | doxygen -
> +       @doxygen Doxyfile

This needs a dependency on Doxyfile in the Makefile or it won't work
if the generated Doxyfile is removed after .configure. I'll fix it in
the tree.

Bart

>  .PHONY: doc
>
>  clean-local:
> diff --git a/configure.ac b/configure.ac
> index 008499d..c2d9f99 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -207,6 +207,7 @@ if test "x$has_doxygen" = xfalse
>  then
>         AC_MSG_NOTICE([doxygen not found - documentation cannot be generated])
>  fi
> +AM_COND_IF([HAS_DOXYGEN], [AC_CONFIG_FILES([Doxyfile])])
>
>  if test "x$cross_compiling" = xno
>  then
> --
> 2.28.0
>



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux