From 3f0805e7f6e4d1019a79d96b8b7e654764b2fa3c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 14 Aug 2020 13:49:16 +0200 Subject: 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. --- doc/meson.build | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/meson.build b/doc/meson.build index 8f85672d7..e6c1da420 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -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 -- cgit v1.2.3