From 1cb305e9be14d8f696acb0473599c6be20ef56d0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 23 Sep 2023 15:56:23 -0400 Subject: Explicitly specify all documentation dependencies Yet another attempt to sort out flaky documentation builds. This tries to be careful and describe the complete documentation dependency graph to meson explicitly (ignoring tool outputs that aren't used). Also remove the shared doctrees directory option, since I suspect this causes issues in parallel builds. --- doc/api/meson.build | 4 ++-- doc/html/meson.build | 5 +++-- doc/meson.build | 11 +++++++---- doc/singlehtml/meson.build | 5 +++-- doc/xml/meson.build | 13 +++++++++---- 5 files changed, 24 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/api/meson.build b/doc/api/meson.build index 3dd9fc9..5bc586e 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -1,9 +1,9 @@ # Copyright 2020-2023 David Robillard # SPDX-License-Identifier: 0BSD OR ISC -c_sratom_rst = custom_target( +api_sratom_rst = custom_target( 'sratom.rst', command: [sphinxygen, '-f', '@INPUT0@', '@OUTDIR@'], - input: [c_index_xml], + input: doxygen_xml, output: 'sratom.rst', ) diff --git a/doc/html/meson.build b/doc/html/meson.build index a6d5ef9..f5921b7 100644 --- a/doc/html/meson.build +++ b/doc/html/meson.build @@ -14,14 +14,15 @@ custom_target( sphinx_in_dir, '@OUTDIR@', ], - input: [c_rst_files, c_sratom_rst, c_index_xml, conf_py], + input: [api_sratom_rst, conf_py, sphinx_input], install: true, install_dir: html_dir, output: [ + 'index.html', + '_static', 'api', 'genindex.html', - 'index.html', 'overview.html', ], ) diff --git a/doc/meson.build b/doc/meson.build index a9d95ab..38dc815 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -44,9 +44,12 @@ if build_docs ) # Copy hand-written documentation files - c_rst_files = files('index.rst', 'overview.rst') - foreach f : c_rst_files - configure_file(copy: true, input: f, output: '@PLAINNAME@') + rst_sources = files('index.rst', 'overview.rst') + sphinx_input = [] + foreach f : rst_sources + sphinx_input += [ + configure_file(copy: true, input: f, output: '@PLAINNAME@'), + ] endforeach # Generate reference documentation input with Doxygen and Sphinxygen @@ -55,7 +58,7 @@ if build_docs # Build strict Sphinx flags, with termination on warnings if werror=true sphinx_in_dir = meson.current_build_dir() - sphinx_flags = ['-d', sphinx_in_dir / '.doctrees', '-E', '-a', '-q'] + sphinx_flags = ['-E', '-a', '-q'] if get_option('werror') sphinx_flags += ['-W'] endif diff --git a/doc/singlehtml/meson.build b/doc/singlehtml/meson.build index 35244a7..09b135e 100644 --- a/doc/singlehtml/meson.build +++ b/doc/singlehtml/meson.build @@ -14,12 +14,13 @@ custom_target( sphinx_in_dir, '@OUTDIR@', ], - input: [c_rst_files, c_sratom_rst, c_index_xml, conf_py], + input: [api_sratom_rst, conf_py, sphinx_input], install: true, install_dir: singlehtml_dir, output: [ - '_static', 'index.html', + + '_static', ], ) diff --git a/doc/xml/meson.build b/doc/xml/meson.build index 119445e..5b53770 100644 --- a/doc/xml/meson.build +++ b/doc/xml/meson.build @@ -5,15 +5,20 @@ config = configuration_data() config.set('SRATOM_SRCDIR', sratom_src_root) config.set('DOX_OUTPUT', meson.current_build_dir() / '..') -c_doxyfile = configure_file( +doxyfile = configure_file( configuration: config, input: files('../Doxyfile.in'), output: 'Doxyfile', ) -c_index_xml = custom_target( +doxygen_xml = custom_target( 'index.xml', command: [doxygen, '@INPUT0@'], - input: [c_doxyfile] + c_headers, - output: 'index.xml', + input: [doxyfile] + c_headers, + output: [ + 'index.xml', + + 'group__sratom.xml', + 'sratom_8h.xml', + ], ) -- cgit v1.2.1