summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@gnome.org>2023-12-20 14:04:11 +0000
committerPhilip Withnall <pwithnall@gnome.org>2023-12-21 13:34:48 +0000
commit031e65808d443f16ce3c492dfe72f24725ca1bd1 (patch)
tree73edc514f5b49cdc7e3277f216cccc15afccc036 /meson.build
parent385641572ddb0115b39c6032e1f407726855ed3c (diff)
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
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build19
1 files changed, 5 insertions, 14 deletions
diff --git a/meson.build b/meson.build
index 0ee4ca014..451590bec 100644
--- a/meson.build
+++ b/meson.build
@@ -2558,19 +2558,10 @@ endif
configure_file(output : 'config.h', configuration : glib_conf)
-if get_option('man')
- xsltproc = find_program('xsltproc', required : true)
- xsltproc_command = [
- xsltproc,
- '--nonet',
- '--stringparam', 'man.output.quietly', '1',
- '--stringparam', 'funcsynopsis.style', 'ansi',
- '--stringparam', 'man.th.extra1.suppress', '1',
- '--stringparam', 'man.authors.section.enabled', '0',
- '--stringparam', 'man.copyright.section.enabled', '0',
- '-o', '@OUTPUT@',
- 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
- '@INPUT@',
+rst2man = find_program('rst2man', 'rst2man.py', required: get_option('man-pages'))
+if rst2man.found()
+ rst2man_flags = [
+ '--syntax-highlight=none',
]
man1_dir = join_paths(glib_prefix, get_option('mandir'), 'man1')
endif
@@ -2634,7 +2625,7 @@ endif
summary({
'xattr' : xattr_dep.length() > 0,
- 'man' : get_option('man'),
+ 'man-pages' : get_option('man-pages'),
'dtrace' : get_option('dtrace'),
'systemtap' : enable_systemtap,
'sysprof' : libsysprof_capture_dep.found(),