Skip to content

Commit

Permalink
meson: check for docbook xsl stylesheets (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
danyeaw authored Nov 5, 2023
1 parent ad6db4c commit 175e6e3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@
as_doc_target_dir = join_paths(get_option('datadir'), 'doc', 'appstream')

# make manual pages
manpages_xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
xsltproc = find_program('xsltproc')
if xsltproc.found()
if run_command([
xsltproc, '--nonet', manpages_xsl,
], check : false).returncode() == 0
message('Docbook XSL stylesheets found for man pages')
else
error('Docbook XSL stylesheets not found for man pages')
endif
endif

custom_target('man-appstreamcli',
input: 'xml/man/appstreamcli.1.xml',
output: 'appstreamcli.1',
Expand All @@ -21,7 +32,7 @@ custom_target('man-appstreamcli',
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.th.extra1.suppress', '1',
'-o', '@OUTPUT@',
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
manpages_xsl,
'@INPUT@'
]
)
Expand All @@ -39,7 +50,7 @@ if get_option('compose')
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.th.extra1.suppress', '1',
'-o', '@OUTPUT@',
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
manpages_xsl,
'@INPUT@'
]
)
Expand Down

0 comments on commit 175e6e3

Please sign in to comment.