2018-09-20 13:22:08 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2018 Intel Corporation
|
|
|
|
|
|
|
|
sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
|
|
|
|
|
2020-01-10 21:52:03 +00:00
|
|
|
if not sphinx.found()
|
2021-04-20 10:22:23 +00:00
|
|
|
subdir_done()
|
2020-01-10 21:52:03 +00:00
|
|
|
endif
|
2018-09-20 13:22:08 +00:00
|
|
|
|
2020-10-01 11:14:01 +00:00
|
|
|
extra_sphinx_args = []
|
|
|
|
if get_option('werror')
|
2021-04-20 10:22:23 +00:00
|
|
|
extra_sphinx_args += '-W'
|
2020-10-01 11:14:01 +00:00
|
|
|
endif
|
|
|
|
|
2020-01-10 21:52:04 +00:00
|
|
|
htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
|
2020-01-10 21:52:03 +00:00
|
|
|
html_guides = custom_target('html_guides',
|
2021-04-20 10:22:23 +00:00
|
|
|
input: files('index.rst'),
|
|
|
|
output: 'html',
|
|
|
|
command: [sphinx_wrapper, sphinx, meson.project_version(),
|
|
|
|
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'),
|
|
|
|
install_dir: htmldir)
|
2018-09-20 13:22:08 +00:00
|
|
|
|
2021-04-20 10:22:23 +00:00
|
|
|
install_data(files('custom.css'), install_dir: join_paths(htmldir,'_static', 'css'))
|
2020-01-10 21:52:04 +00:00
|
|
|
|
2020-01-10 21:52:03 +00:00
|
|
|
doc_targets += html_guides
|
|
|
|
doc_target_names += 'HTML_Guides'
|