summaryrefslogtreecommitdiffstats
path: root/docs/meson.build
blob: ac429995fcf3c616ec84532f35f65cd27f6bae84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
sources = [
    'changes.rst',
    'copyright.rst',
    'examples.rst',
    'filters.rst',
    'generators.rst',
    'index.rst',
    'install.rst',
    'kernels.rst',
    'piv.rst',
    'sinks.rst',
    'contrib/index.rst',
    'contrib/sxcfilters.rst',
]

sphinx = find_program('sphinx-build', required: false)

if sphinx.found()
    command = [
        sphinx.path(),
        '-q',
        '-b', 'html',
        meson.current_source_dir(),
        meson.current_build_dir(),
    ]

    manual = custom_target('manual',
        build_by_default: true,
        command: command,
        input: sources,
        output: 'index.html',
    )

    install_subdir(meson.current_build_dir(), install_dir: docdir)
else
    message('sphinx not found, cannot generate manual.')
endif