xref: /dpdk/doc/guides/meson.build (revision f665790a5dbad7b645ff46f31d65e977324e7bfc)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2018 Intel Corporation
3
4sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
5
6if not sphinx.found()
7    subdir_done()
8endif
9
10extra_sphinx_args = ['-a']
11if get_option('werror')
12    extra_sphinx_args += '-W'
13endif
14
15htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
16html_guides = custom_target('html_guides',
17        input: files('index.rst'),
18        output: 'html',
19        command: [sphinx_wrapper, sphinx, meson.project_version(),
20            meson.current_source_dir(), meson.current_build_dir(),
21            extra_sphinx_args],
22        depfile: '.html.d',
23        build_by_default: get_option('enable_docs'),
24        install: get_option('enable_docs'),
25        install_dir: htmldir)
26
27doc_targets += html_guides
28doc_target_names += 'HTML_Guides'
29