1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-25 21:29:32 +00:00

meson: Build manpage with rst2man

Closes #457
This commit is contained in:
Evangelos Ribeiro Tzaras 2022-05-31 20:03:49 +02:00
parent c86df0f564
commit 6738962073
2 changed files with 20 additions and 0 deletions

View file

@ -44,3 +44,19 @@ gnome.gtkdoc('calls',
install: true)
endif
rst2man = find_program('rst2man', 'rst2man.py', required: false)
if get_option('manpages') and not rst2man.found()
error('No rst2man found, but man pages were explicitly enabled')
endif
if get_option('manpages') and rst2man.found()
custom_target('man-gnome-calls',
input: 'gnome-calls.rst',
output: 'gnome-calls.1',
command: [rst2man, '@INPUT@'],
capture: true,
install: true,
install_dir: get_option('mandir') / 'man1',
)
endif

View file

@ -5,3 +5,7 @@ option('gtk_doc',
option('tests',
type: 'boolean', value: true,
description: 'Whether to compile unit tests')
option('manpages',
type: 'boolean', value: true,
description: 'Whether to generate man pages')