On Tue, Oct 22, 2024 at 05:11:42PM +0200, Robin Jarry wrote:
> Fix the following meson warning when -Denable_docs=false:
> 
>  $ meson setup build -Denable_docs=false -Denable_drivers=net/null \
>       -Denable_libs=rib -Ddisable_apps=* --wipe --fatal-meson-warnings
>  ...
>  Program doxygen found: YES (/usr/bin/doxygen)
>  Configuring doxy-api-html.conf using configuration
>  doc/api/meson.build:54: WARNING: The variable(s) 'DTS_API_MAIN_PAGE' in
>  the input file 'doc/api/doxy-api.conf.in' are not present in the given
>  configuration data.
>  doc/api/meson.build:54:17: ERROR: Fatal warnings enabled, aborting
> 
> When -Denable_docs=false, do not even enter the doc subdir. Replace all
> occurrences of get_option('enable_docs') in the doc subdir with true.
> 
> Fixes: 7f9326423a04 ("dts: add API doc generation")
> Signed-off-by: Robin Jarry <rja...@redhat.com>
> ---
>  doc/api/dts/meson.build |  6 +++---
>  doc/api/meson.build     | 16 ++++++++--------
>  doc/guides/meson.build  |  6 +++---
>  meson.build             |  6 ++++--
>  4 files changed, 18 insertions(+), 16 deletions(-)
> 
No strong objection to this. Just FYI, the reason it is currently done as
it is in the build, is that even if you configure a build without the docs
enabled, you can just build the docs explicitly by doing "ninja -C build
doc". That is so that one can do a test build of the docs without
a) having to reconfigure the whole project
b) not have every build from then on rebuild e.g. the APIs doc if you
change a header.

Regards,
/Bruce

Reply via email to