[libvirt PATCH 335/351] meson: docs/manpages: install man pages
Peter Krempa
pkrempa at redhat.com
Wed Jul 22 16:51:58 UTC 2020
On Thu, Jul 16, 2020 at 11:59:31 +0200, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
[...]
> +foreach name : keyname_list
> + rst_file = custom_target(
> + 'virkeyname- at 0@.rst'.format(name),
> + input: keymap_src_file,
> + output: 'virkeyname- at 0@.rst'.format(name),
> + command: [
> + meson_python_prog, python3_prog, keymap_gen_prog, 'name-docs',
> + '--lang', 'rst',
> + '--title', 'virkeyname- at 0@'.format(name),
> + '--subtitle', 'Key name values for @0@'.format(name),
> + '@INPUT@', name,
> + ],
> + capture: true,
> + build_by_default: true,
> + )
> +
> + docs_man_files += {
> + 'name': 'virkeyname- at 0@'.format(name), 'section': '7', 'install': true, 'file': rst_file,
> + }
> +endforeach
> +
> +docs_man_conf = configuration_data()
> +docs_man_conf.set('SYSCONFDIR', sysconfdir)
> +docs_man_conf.set('RUNSTATEDIR', runstatedir)
> +
> +foreach data : docs_man_files
> + rst_in_file = '@0 at .rst.in'.format(data['name'])
> + html_in_file = '@0 at .html.in'.format(data['name'])
> + html_file = '@0 at .html'.format(data['name'])
> +
> + if data.has_key('file')
> + rst_file = data['file']
> + else
> + rst_file = configure_file(
> + input: rst_in_file,
> + output: '@0 at .rst'.format(data['name']),
> + configuration: docs_man_conf,
> + )
> + endif
I must say it feels weird process these through configure_file. Also
it's super weird that they've overloaded 3 modes into configure_file.
What's the difference to generator() by the way, since we use it for
rst->html conversion? I'd expect that we could use configure_file there
or generator here then.
Also is there a possibility where the input and output file will have
the same name? I'm not very fond of the .rst.in files.
More information about the libvir-list
mailing list