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
|
docs_man_files = [
{ 'name': 'cputool', 'section': '8', 'install': true },
]
docs_man_conf = configuration_data()
docs_man_conf.set('VERSION', meson.project_version())
foreach data : docs_man_files
rst_in_file = '@0@.rst'.format(data['name'])
html_in_file = '@0@.html.in'.format(data['name'])
html_file = '@0@.html'.format(data['name'])
if data.has_key('file')
rst_file = data['file']
else
rst_file = configure_file(
input: rst_in_file,
output: '@0@.rst'.format(data['name']),
configuration: docs_man_conf,
)
endif
if data['install']
man_file = '@0@.@1@'.format(data['name'], data['section'])
man_page = custom_target(
man_file,
input: rst_file,
output: man_file,
# The 'contents' element is the table of contents which is undesired in manpage
command: [ rst2man_prog, '--strip-elements-with-class', 'contents', '--strict', '@INPUT@', '@OUTPUT@' ],
install: true,
install_dir: mandir / 'man@0@'.format(data['section']),
)
endif
endforeach
|