summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/c/api/meson.build2
-rw-r--r--doc/c/meson.build4
-rw-r--r--doc/meson.build9
3 files changed, 11 insertions, 4 deletions
diff --git a/doc/c/api/meson.build b/doc/c/api/meson.build
index 259117d..22aa355 100644
--- a/doc/c/api/meson.build
+++ b/doc/c/api/meson.build
@@ -3,7 +3,7 @@
c_sratom_rst = custom_target(
'sratom.rst',
- command: [dox_to_sphinx, '-f', '@INPUT0@', '@OUTDIR@'],
+ command: [sphinxygen, '-f', '@INPUT0@', '@OUTDIR@'],
input: [c_index_xml] + c_rst_files,
output: 'sratom.rst',
)
diff --git a/doc/c/meson.build b/doc/c/meson.build
index 2a7a030..502dd83 100644
--- a/doc/c/meson.build
+++ b/doc/c/meson.build
@@ -10,7 +10,7 @@ conf_py = configure_file(
output: 'conf.py',
)
-configure_file(
+summary_rst = configure_file(
copy: true,
input: files('../summary.rst'),
output: 'summary.rst',
@@ -21,6 +21,8 @@ c_rst_files = files(
'overview.rst',
)
+sratom_doc_rst_files = [summary_rst] + c_rst_files
+
foreach f : c_rst_files
configure_file(copy: true, input: f, output: '@PLAINNAME@')
endforeach
diff --git a/doc/meson.build b/doc/meson.build
index 7e447d5..4bccb1f 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')