2 configure_file(output: 'index.html',
3 input: files('index.html.in'),
4 configuration: {'VERSION': meson.project_version()},
5 install_dir: qemu_docdir)
6 manuals = [ 'devel', 'interop', 'tools', 'specs', 'system', 'user' ]
9 'qemu-ga.8': (have_tools ? 'man8' : ''),
10 'qemu-ga-ref.7': 'man7',
11 'qemu-qmp-ref.7': 'man7',
14 'qemu-img.1': (have_tools ? 'man1' : ''),
15 'qemu-nbd.8': (have_tools ? 'man8' : ''),
16 'qemu-trace-stap.1': (config_host.has_key('CONFIG_TRACE_SYSTEMTAP') ? 'man1' : ''),
17 'virtfs-proxy-helper.1': (have_virtfs_proxy_helper ? 'man1' : ''),
18 'virtiofsd.1': (have_virtiofsd ? 'man1' : ''),
22 'qemu-block-drivers.7': 'man7',
23 'qemu-cpu-models.7': 'man7'
29 foreach manual : manuals
30 private_dir = meson.current_build_dir() / (manual + '.p')
31 output_dir = meson.current_build_dir() / manual
32 input_dir = meson.current_source_dir() / manual
34 this_manual = custom_target(manual + ' manual',
35 build_by_default: build_docs,
36 output: [manual + '.stamp'],
37 input: [files('conf.py'), files(manual / 'conf.py')],
38 depfile: manual + '.d',
39 depend_files: sphinx_extn_depends,
40 command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
41 '-Ddepfile_stamp=@OUTPUT0@',
42 '-b', 'html', '-d', private_dir,
43 input_dir, output_dir])
44 sphinxdocs += this_manual
45 if build_docs and manual != 'devel'
46 install_subdir(output_dir, install_dir: qemu_docdir)
51 foreach page, section : man_pages.get(manual, {})
52 these_man_pages += page
53 install_dirs += section == '' ? false : get_option('mandir') / section
55 if these_man_pages.length() > 0
56 sphinxmans += custom_target(manual + ' man pages',
57 build_by_default: build_docs,
58 output: these_man_pages,
61 install_dir: install_dirs,
62 command: [SPHINX_ARGS, '-b', 'man', '-d', private_dir,
63 input_dir, meson.current_build_dir()])
66 alias_target('sphinxdocs', sphinxdocs)
67 alias_target('html', sphinxdocs)
68 alias_target('man', sphinxmans)