Convert raw manpages to reStructured text

Build with `rst2man mpd.1.rst mpd.1`
This commit is contained in:
kaliko
2020-04-22 19:42:06 +02:00
committed by Max Kellermann
parent 9df2469e51
commit 5f63ffd86c
7 changed files with 263 additions and 237 deletions

View File

@@ -1,5 +1,3 @@
install_man(['mpd.1', 'mpd.conf.5'])
if not get_option('html_manual')
subdir_done()
endif
@@ -39,3 +37,16 @@ if get_option('html_manual')
],
)
endif
if get_option('manpages')
manpages = custom_target(
'Manpage documentation',
output: 'man',
input: ['mpd.1.rst', 'mpd.conf.5.rst', 'conf.py'],
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTPUT@'],
build_by_default: true,
)
install_data(join_paths(manpages.full_path(), 'mpd.1'), install_dir: join_paths(get_option('mandir'), 'man1'))
install_data(join_paths(manpages.full_path(), 'mpd.conf.5'), install_dir: join_paths(get_option('mandir'), 'man5'))
endif