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:
parent
4c93165a67
commit
3f0805e7f6
|
@ -39,14 +39,16 @@ if get_option('html_manual')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('manpages')
|
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',
|
'Manpage documentation',
|
||||||
output: 'man',
|
output: 'man1',
|
||||||
input: ['mpd.1.rst', 'mpd.conf.5.rst', 'conf.py'],
|
input: ['mpd.1.rst', 'conf.py'],
|
||||||
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTPUT@'],
|
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTPUT@'],
|
||||||
build_by_default: true,
|
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
|
endif
|
||||||
|
|
Loading…
Reference in New Issue