xref: /dpdk/doc/api/dts/meson.build (revision f4ccce58c1a33cb41e1e820da504698437987efc)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2023 PANTHEON.tech s.r.o.
3
4sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
5if not sphinx.found()
6    subdir_done()
7endif
8
9python_ver_satisfied = run_command(check_dts_requirements, check: false).returncode()
10if python_ver_satisfied != 0
11    subdir_done()
12endif
13
14extra_sphinx_args = ['-E', '-c', join_paths(doc_source_dir, 'guides')]
15
16# DTS docs are generated inside main Doxygen docs build directory
17# DTS docs relies on main docs to install it so does not define install dir
18dts_api_html = custom_target('dts_api_html',
19        depends: doxy_html_build,
20        output: 'html',
21        command: [sphinx_wrapper, sphinx, meson.project_version(),
22            meson.current_source_dir(), join_paths(api_build_dir, 'html', 'dts'), extra_sphinx_args],
23        build_by_default: get_option('enable_docs'))
24
25doc_targets += dts_api_html
26doc_target_names += 'DTS_API_HTML'
27