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()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2018-09-20 13:22:08 +00:00
|
|
|
|
2020-10-01 11:14:01 +00:00
|
|
|
extra_sphinx_args = []
|
|
|
|
if get_option('werror')
|
|
|
|
extra_sphinx_args += '-W'
|
|
|
|
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',
|
2020-01-10 21:52:04 +00:00
|
|
|
input: files('index.rst'),
|
|
|
|
output: 'html',
|
2020-09-03 15:26:58 +00:00
|
|
|
command: [sphinx_wrapper, sphinx, meson.project_version(),
|
2020-10-01 11:14:01 +00:00
|
|
|
meson.current_source_dir(), meson.current_build_dir(),
|
|
|
|
extra_sphinx_args],
|
2020-01-10 21:52:04 +00:00
|
|
|
depfile: '.html.d',
|
2020-01-10 21:52:03 +00:00
|
|
|
build_by_default: get_option('enable_docs'),
|
|
|
|
install: get_option('enable_docs'),
|
|
|
|
install_dir: htmldir)
|
2018-09-20 13:22:08 +00:00
|
|
|
|
2020-01-10 21:52:04 +00:00
|
|
|
install_data(files('custom.css'),
|
|
|
|
install_dir: join_paths(htmldir,'_static', 'css'))
|
|
|
|
|
2020-01-10 21:52:03 +00:00
|
|
|
doc_targets += html_guides
|
|
|
|
doc_target_names += 'HTML_Guides'
|