doc/meson.build: let custom_target() install manpages

install_man() is currently broken with Meson and doesn't support a
custom target argument.

The problem with this kludge is that both mpd.1 and mpd.conf.5 are
installed in /usr/share/man/man1/, but apparently, there's no solution
yet.
This commit is contained in:
Max Kellermann 2020-08-14 13:49:16 +02:00
parent 4c93165a67
commit 3f0805e7f6
1 changed files with 8 additions and 6 deletions

View File

@ -39,14 +39,16 @@ if get_option('html_manual')
endif
if get_option('manpages')
manpages = custom_target(
# This installs all manpages in the "man1" subdirectory. Due to
# https://github.com/mesonbuild/meson/issues/1550 there appears to
# be no good solution with Meson. Sigh.
custom_target(
'Manpage documentation',
output: 'man',
input: ['mpd.1.rst', 'mpd.conf.5.rst', 'conf.py'],
output: 'man1',
input: ['mpd.1.rst', 'conf.py'],
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTPUT@'],
build_by_default: true,
install: true,
install_dir: get_option('mandir'),
)
install_man(join_paths(manpages.full_path(), 'mpd.1'),
join_paths(manpages.full_path(), 'mpd.conf.5'))
endif