From e47ee08c5d497fe921cc264c2573bfc21f492cf6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 8 Dec 2022 19:07:17 -0500 Subject: Replace duplicated dox_to_sphinx script with sphinxygen dependency --- doc/c/Doxyfile.in | 2 +- doc/c/api/meson.build | 2 +- doc/meson.build | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/c/Doxyfile.in b/doc/c/Doxyfile.in index 827a8ad..2ca5694 100644 --- a/doc/c/Doxyfile.in +++ b/doc/c/Doxyfile.in @@ -26,6 +26,6 @@ PREDEFINED = LILV_API LILV_DEPRECATED RECURSIVE = YES STRIP_FROM_PATH = @LILV_SRCDIR@ -INPUT = @LILV_SRCDIR@/include +INPUT = @LILV_SRCDIR@/include/lilv/lilv.h OUTPUT_DIRECTORY = @DOX_OUTPUT@ diff --git a/doc/c/api/meson.build b/doc/c/api/meson.build index fdf2037..8c8293b 100644 --- a/doc/c/api/meson.build +++ b/doc/c/api/meson.build @@ -3,7 +3,7 @@ c_lilv_rst = custom_target( 'lilv.rst', - command: [dox_to_sphinx, '-f', '@INPUT0@', '@OUTDIR@'], + command: [sphinxygen, '-f', '@INPUT0@', '@OUTDIR@'], input: [c_index_xml] + c_rst_files, output: 'lilv.rst', ) diff --git a/doc/meson.build b/doc/meson.build index db68e86..7c633a0 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -4,10 +4,15 @@ 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')) -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