docs: Port the man pages from DocBook to reStructuredText

So they are consistent with the way we’re building man pages in other
projects, and because some people are allergic to XML.

This changes the build-time dependencies from `xsltproc` to `rst2man`,
and also takes the opportunity to change the `-Dman` Meson option from a
boolean to a feature (so you should use `-Dman-pages={enabled,disabled}`
now, rather than `-Dman={true,false}`).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
This commit is contained in:
Philip Withnall
2023-12-20 14:04:11 +00:00
parent 385641572d
commit 031e65808d
37 changed files with 3524 additions and 5326 deletions

View File

@@ -1,12 +1,17 @@
if get_option('man')
if get_option('man-pages').enabled()
manpages = ['gapplication', 'gio-querymodules', 'glib-compile-schemas',
'glib-compile-resources', 'gsettings', 'gresource', 'gdbus',
'gio', 'gdbus-codegen']
foreach page : manpages
custom_target(page + '-man',
input: page + '.xml',
input: page + '.rst',
output: page + '.1',
command: xsltproc_command,
command: [
rst2man,
rst2man_flags,
'@INPUT@',
],
capture: true,
install: true,
install_dir: man1_dir,
install_tag: 'doc',