1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Intel Corporation
4 sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
7 htmldir = join_paths('share', 'doc', 'dpdk')
8 html_guides_build = custom_target('html_guides_build',
9 input: meson.current_source_dir(),
11 command: [sphinx, '-b', 'html',
12 '-d', meson.current_build_dir() + '/.doctrees',
13 '@INPUT@', meson.current_build_dir() + '/guides'],
14 build_by_default: false,
15 install: get_option('enable_docs'),
18 doc_targets += html_guides_build
19 doc_target_names += 'HTML_Guides'
21 # sphinx leaves a .buildinfo in the target directory, which we don't
22 # want to install. Note that sh -c has to be used, otherwise the
23 # env var does not get expanded if calling rm/install directly.
24 meson.add_install_script('sh', '-c',
25 'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo')
26 meson.add_install_script('sh', '-c',
27 'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css')