Skip to content

Commit

Permalink
trivial: Simplify meson manpage XSL check
Browse files Browse the repository at this point in the history
find_program will fail already if the executable is missing, so we don't
need to check for it twice, we also only need to print a message when
the XSL definitions are missing.
  • Loading branch information
ximion committed Nov 5, 2023
1 parent 175e6e3 commit 8718db4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions docs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ 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
if run_command([xsltproc, '--nonet', manpages_xsl],
check: false).returncode() != 0
error('Unable to find Docbook XSL stylesheets for man pages')
endif

custom_target('man-appstreamcli',
Expand Down

0 comments on commit 8718db4

Please sign in to comment.