diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2018-10-26 01:32:26 +0200 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2018-10-29 12:36:07 +0000 |
commit | 42ad25ef48957b33cd9d37afaa150022958440e1 (patch) | |
tree | 7291e8bcd327b7c57ce7eff10c768336ace21da0 /man | |
parent | f25d5446b6f16f739ccc7a5b957464d7629a30eb (diff) | |
download | colord-42ad25ef48957b33cd9d37afaa150022958440e1.tar.gz |
man: Port to xsltproc
Diffstat (limited to 'man')
-rw-r--r-- | man/meson.build | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/man/meson.build b/man/meson.build index 54d83e5..b9e3b9e 100644 --- a/man/meson.build +++ b/man/meson.build @@ -1,41 +1,49 @@ -docbook2man = find_program('docbook2man') +xsltproc = find_program('xsltproc') + +stylesheet_url = 'http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl' +ret = run_command(xsltproc, '--nonet', stylesheet_url) +if ret.returncode() != 0 + error('Cannot build man pages without docbook-xsl-ns') +endif + +xsltproc_args = [ + xsltproc, + '--output', '@OUTPUT@', + '--nonet', + '--stringparam', 'man.authors.section.enabled', '0', + '--stringparam', 'man.copyright.section.enabled', '0', + '--stringparam', 'man.output.quietly', '1', + '--stringparam', 'man.th.extra1.suppress', '1', + '--stringparam', 'funcsynopsis.style', 'ansi', + stylesheet_url, + '@INPUT@', +] + custom_target('colormgr-man', input : 'colormgr.xml', - output : 'colormgr.1', - command : [ - docbook2man, '@INPUT@', - '--output', meson.current_build_dir(), - ], + output : '@BASENAME@.1', + command : xsltproc_args, install : true, install_dir : join_paths(mandir, 'man1'), ) custom_target('cd-create-profile-man', input : 'cd-create-profile.xml', - output : 'cd-create-profile.1', - command : [ - docbook2man, '@INPUT@', - '--output', meson.current_build_dir(), - ], + output : '@BASENAME@.1', + command : xsltproc_args, install : true, install_dir : join_paths(mandir, 'man1'), ) custom_target('cd-fix-profile-man', input : 'cd-fix-profile.xml', - output : 'cd-fix-profile.1', - command : [ - docbook2man, '@INPUT@', - '--output', meson.current_build_dir(), - ], + output : '@BASENAME@.1', + command : xsltproc_args, install : true, install_dir : join_paths(mandir, 'man1'), ) custom_target('cd-it8-man', input : 'cd-it8.xml', - output : 'cd-it8.1', - command : [ - docbook2man, '@INPUT@', - '--output', meson.current_build_dir(), - ], + output : '@BASENAME@.1', + command : xsltproc_args, install : true, install_dir : join_paths(mandir, 'man1'), ) |