From 9e2f2b436a6eeefcf22434afa15193d8831b40c0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 3 Apr 2023 09:00:33 -0400 Subject: Only load sphinxygen subproject if required tools are found --- doc/meson.build | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'doc/meson.build') diff --git a/doc/meson.build b/doc/meson.build index e1a20aa4..ccd9426e 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -3,22 +3,33 @@ docdir = get_option('datadir') / 'doc' +############# +# Reference # +############# + doxygen = find_program('doxygen', required: get_option('docs')) -sphinxygen = find_program('sphinxygen', required: false) sphinx_build = find_program('sphinx-build', required: get_option('docs')) -mandoc = find_program('mandoc', required: false) -if not sphinxygen.found() - subproject('sphinxygen') - sphinxygen = find_program('sphinxygen', required: get_option('docs')) +if doxygen.found() and sphinx_build.found() + sphinxygen = find_program('sphinxygen', required: false) + if not sphinxygen.found() + subproject('sphinxygen') + sphinxygen = find_program('sphinxygen', required: get_option('docs')) + endif +else + sphinxygen = disabler() endif build_docs = doxygen.found() and sphinxygen.found() and sphinx_build.found() - if build_docs subdir('c') endif +############# +# Man Pages # +############# + +mandoc = find_program('mandoc', required: false) mandoc_css = files('mandoc.css') if not get_option('tests').disabled() @@ -42,5 +53,6 @@ if mandoc.found() endif if not meson.is_subproject() - summary('API Documentation', build_docs, bool_yn: true) + summary('HTML man pages', build_docs, bool_yn: true) + summary('Reference documentation', build_docs, bool_yn: true) endif -- cgit v1.2.1