summaryrefslogtreecommitdiffstats
path: root/doc/readthedocs/meson.build
blob: a81afa1fd695a589a3b1ca7b9443b95cad723fde (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) 2022, Dell Inc. or its subsidiaries.  All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See the LICENSE file for details.
#
# This file is part of NVMe STorage Appliance Services (nvme-stas).
#
# Authors: Martin Belanger <Martin.Belanger@dell.com>
#

pandoc = find_program('pandoc', required: true)

components = [
    'conf.py',
    'Makefile',
    'make.bat',
    'index.rst',
    'environment.txt',
    'installation.rst',
    'nvme-stas.rst',
    conf.get('STACD_DBUS_NAME') + '.debug.rst',
    conf.get('STACD_DBUS_NAME') + '.rst',
    conf.get('STAFD_DBUS_NAME') + '.debug.rst',
    conf.get('STAFD_DBUS_NAME') + '.rst',
    'stacctl.rst',
    'stacd-index.rst',
    'stacd.conf.rst',
    'stacd.rst',
    'stacd.service.rst',
    'stafctl.rst',
    'stafd-index.rst',
    'stafd.conf.rst',
    'stafd.rst',
    'stafd.service.rst',
    'stas-config.target.rst',
    'stas-config@.service.rst',
    'stasadm.rst',
    'sys.conf.rst',
]
foreach component : components
    configure_file(
        input:         component,
        output:        component,
        configuration: conf,
    )
endforeach

foreach tuple: html_files
    stem = tuple[0]
    html_file = tuple[1]
    rst = '_' + stem + '.rst'
    custom_target(
        rst,
        input: html_file,
        output: rst,
        build_by_default: true,
        command: [
            pandoc,
            '-f', 'html',
            '-t', 'rst',
            '-o', '@OUTPUT@',
            '@INPUT@'
        ]
    )
endforeach