summaryrefslogtreecommitdiff
path: root/docs/man/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man/meson.build')
-rw-r--r--docs/man/meson.build36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/man/meson.build b/docs/man/meson.build
new file mode 100644
index 0000000..241e82c
--- /dev/null
+++ b/docs/man/meson.build
@@ -0,0 +1,36 @@
+xsltproc = find_program('xsltproc', required: false)
+assert(xsltproc.found(), 'xsltproc is required for man pages generation')
+
+xsltproc_cmd = [
+ xsltproc,
+ '--output', '@OUTPUT@',
+ '--nonet',
+ '--stringparam', 'man.base.url.for.relative.links', pk_api_docpath + '/',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@',
+]
+
+mans = [
+ ['polkit', '8'],
+ ['polkitd', '8'],
+ ['pkexec', '1'],
+ ['pkcheck', '1'],
+ ['pkaction', '1'],
+ ['pkttyagent', '1'],
+]
+
+foreach man: mans
+ xml = files(man[0] + '.xml')
+ content_files += xml
+
+ output = '@0@.@1@'.format(man[0], man[1])
+
+ custom_target(
+ output,
+ input: xml,
+ output: output,
+ command: xsltproc_cmd,
+ install: true,
+ install_dir: pk_mandir / ('man' + man[1]),
+ )
+endforeach