summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-03-13 12:20:02 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-03-13 12:29:56 +0000
commita5778e2cf38ea81710cd47d5284e0c6ae8356ad3 (patch)
tree61b52d97014d6f933ef618a436f45e0742d7f0cd /doc
parentf33d681c51aa2fd9754e8282889fb86dd30291e4 (diff)
downloadjson-glib-a5778e2cf38ea81710cd47d5284e0c6ae8356ad3.tar.gz
Generate the man pages for json-glib tools in Meson
A simple case of calling xsltproc with the right doctype. https://bugzilla.gnome.org/show_bug.cgi?id=773603
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/meson.build32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index 95a7860..0aaa709 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -32,3 +32,35 @@ gnome.gtkdoc('json-glib',
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
],
install: true)
+
+xsltproc = find_program('xsltproc', required: false)
+if get_option('enable-man') and xsltproc.found()
+ xlstproc_flags = [
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '1',
+ '--stringparam', 'man.copyright.section.enabled', '1',
+ ]
+
+ man_files = [
+ 'json-glib-format',
+ 'json-glib-validate',
+ ]
+
+ foreach m: man_files
+ custom_target(m + ' man page',
+ input: '@0@.xml'.format(m),
+ output: '@0@.1'.format(m),
+ command: [
+ xsltproc,
+ xlstproc_flags,
+ '-o', '@OUTPUT@',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@',
+ ],
+ install: true,
+ install_dir: join_paths(json_mandir, 'man1'))
+ endforeach
+endif