From: Robin Jarry <rjarry@redhat.com>
To: dev@dpdk.org, "Bruce Richardson" <bruce.richardson@intel.com>,
"Jeremy Spewock" <jspewock@iol.unh.edu>,
"Luca Vizzarro" <luca.vizzarro@arm.com>,
"Dean Marx" <dmarx@iol.unh.edu>,
"Thomas Monjalon" <thomas@monjalon.net>,
"Juraj Linkeš" <juraj.linkes@pantheon.tech>
Subject: [PATCH dpdk] meson: properly disable docs
Date: Tue, 22 Oct 2024 17:11:42 +0200 [thread overview]
Message-ID: <20241022151142.246535-2-rjarry@redhat.com> (raw)
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 <rjarry@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(-)
diff --git a/doc/api/dts/meson.build b/doc/api/dts/meson.build
index 5115df70956b..a8edd232ddcf 100644
--- a/doc/api/dts/meson.build
+++ b/doc/api/dts/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2023 PANTHEON.tech s.r.o.
-sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
+sphinx = find_program('sphinx-build', required: true)
if not sphinx.found()
subdir_done()
endif
@@ -23,8 +23,8 @@ dts_api_html = custom_target('dts_api_html',
output: 'html',
command: [sphinx_wrapper, sphinx, meson.project_version(),
meson.current_source_dir(), meson.current_build_dir(), extra_sphinx_args],
- build_by_default: get_option('enable_docs'),
- install: get_option('enable_docs'),
+ build_by_default: true,
+ install: true,
install_dir: htmldir)
doc_targets += dts_api_html
diff --git a/doc/api/meson.build b/doc/api/meson.build
index ae23e9825edc..d82803df388d 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
-doxygen = find_program('doxygen', required: get_option('enable_docs'))
+doxygen = find_program('doxygen', required: true)
if not doxygen.found()
# process DTS API doc build even if DPDK API doc build can't be done
@@ -28,9 +28,9 @@ example = custom_target('examples.dox',
output: 'examples.dox',
command: [generate_examples, join_paths(dpdk_source_root, 'examples'), '@OUTPUT@'],
depfile: 'examples.dox.d',
- install: get_option('enable_docs'),
+ install: true,
install_dir: htmldir,
- build_by_default: get_option('enable_docs'))
+ build_by_default: true)
# set up common Doxygen configuration
cdata = configuration_data()
@@ -76,9 +76,9 @@ doxy_html_build = custom_target('doxygen-html',
output: 'html',
depfile: 'html.d',
command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'],
- install: get_option('enable_docs'),
+ install: true,
install_dir: htmldir,
- build_by_default: get_option('enable_docs'))
+ build_by_default: true)
doc_targets += doxy_html_build
doc_target_names += 'Doxygen_API(HTML)'
@@ -90,9 +90,9 @@ doxy_man_build = custom_target('doxygen-man',
output: 'man',
depfile: 'man.d',
command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'],
- install: get_option('enable_docs'),
+ install: true,
install_dir: get_option('datadir'),
- build_by_default: get_option('enable_docs'))
+ build_by_default: true)
doc_targets += doxy_man_build
doc_target_names += 'Doxygen_API(Manpage)'
@@ -100,7 +100,7 @@ doc_target_names += 'Doxygen_API(Manpage)'
# refresh the manpage database on install
# if DPDK manpages are installed to a staging directory, not in MANPATH, this has no effect
mandb = find_program('mandb', required: false)
-if mandb.found() and get_option('enable_docs')
+if mandb.found()
meson.add_install_script(mandb)
endif
diff --git a/doc/guides/meson.build b/doc/guides/meson.build
index f8bbfba9f5b5..840f9c8a6bfb 100644
--- a/doc/guides/meson.build
+++ b/doc/guides/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
+sphinx = find_program('sphinx-build', required: true)
if not sphinx.found()
subdir_done()
@@ -20,8 +20,8 @@ html_guides = custom_target('html_guides',
meson.current_source_dir(), meson.current_build_dir(),
extra_sphinx_args],
depfile: '.html.d',
- build_by_default: get_option('enable_docs'),
- install: get_option('enable_docs'),
+ build_by_default: true,
+ install: true,
install_dir: htmldir)
doc_targets += html_guides
diff --git a/meson.build b/meson.build
index fe9040369ab9..d67d5577a1d4 100644
--- a/meson.build
+++ b/meson.build
@@ -82,8 +82,10 @@ subdir('drivers')
subdir('usertools')
subdir('app')
-# build docs
-subdir('doc')
+if get_option('enable_docs')
+ # build docs
+ subdir('doc')
+endif
# build any examples explicitly requested - useful for developers - and
# install any example code into the appropriate install path
--
2.47.0
next reply other threads:[~2024-10-22 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 15:11 Robin Jarry [this message]
2024-10-22 15:25 ` Bruce Richardson
2024-10-22 15:31 ` Robin Jarry
2024-10-22 15:49 ` Bruce Richardson
2024-10-22 16:01 ` Thomas Monjalon
2024-10-22 15:36 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241022151142.246535-2-rjarry@redhat.com \
--to=rjarry@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=jspewock@iol.unh.edu \
--cc=juraj.linkes@pantheon.tech \
--cc=luca.vizzarro@arm.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).