From 9a222ac2ae6b4dac6dd8a414498523f472e90279 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Dec 2022 13:46:03 -0500 Subject: Replace duplicated dox_to_sphinx script with sphinxygen dependency --- doc/c/api/meson.build | 2 +- doc/meson.build | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/c/api/meson.build b/doc/c/api/meson.build index 377cb2b4..b40af2f1 100644 --- a/doc/c/api/meson.build +++ b/doc/c/api/meson.build @@ -3,7 +3,7 @@ c_serd_rst = custom_target( 'serd.rst', - command: [dox_to_sphinx, '-f', '@INPUT0@', '@OUTDIR@'], + command: [sphinxygen, '-f', '@INPUT0@', '@OUTDIR@'], input: [c_index_xml] + c_rst_files, output: 'serd.rst', ) diff --git a/doc/meson.build b/doc/meson.build index b97ba610..e1a20aa4 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -4,11 +4,16 @@ docdir = get_option('datadir') / 'doc' doxygen = find_program('doxygen', required: get_option('docs')) -dox_to_sphinx = files('../scripts/dox_to_sphinx.py') +sphinxygen = find_program('sphinxygen', required: false) sphinx_build = find_program('sphinx-build', required: get_option('docs')) mandoc = find_program('mandoc', required: false) -build_docs = doxygen.found() and sphinx_build.found() +if not sphinxygen.found() + subproject('sphinxygen') + sphinxygen = find_program('sphinxygen', required: get_option('docs')) +endif + +build_docs = doxygen.found() and sphinxygen.found() and sphinx_build.found() if build_docs subdir('c') -- cgit v1.2.1