summaryrefslogtreecommitdiff
path: root/doc/meson.build
diff options
context:
space:
mode:
authorkaliko <kaliko@azylum.org>2020-04-22 19:42:06 +0200
committerMax Kellermann <max@musicpd.org>2020-08-14 13:14:34 +0200
commit5f63ffd86cdd27ee98b4451f6445889e1efb3fb5 (patch)
treefb47b2b45d64a4722be02b3210082d96a8a6ec85 /doc/meson.build
parent9df2469e514d4a5739de9ca045dea9e612aca804 (diff)
Convert raw manpages to reStructured text
Build with `rst2man mpd.1.rst mpd.1`
Diffstat (limited to 'doc/meson.build')
-rw-r--r--doc/meson.build15
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/meson.build b/doc/meson.build
index 630a25d20..06b66e557 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -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