aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/c/api/meson.build6
-rw-r--r--doc/c/meson.build6
-rw-r--r--doc/c/xml/meson.build4
-rw-r--r--doc/cpp/api/meson.build2
-rw-r--r--doc/cpp/meson.build6
-rw-r--r--doc/cpp/xml/meson.build4
-rw-r--r--doc/meson.build18
7 files changed, 26 insertions, 20 deletions
diff --git a/doc/c/api/meson.build b/doc/c/api/meson.build
index 6b21aae..846dc94 100644
--- a/doc/c/api/meson.build
+++ b/doc/c/api/meson.build
@@ -1,9 +1,9 @@
-# Copyright 2021 David Robillard <d@drobilla.net>
+# Copyright 2021-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
c_pugl_rst = custom_target(
- 'C API ReST Documentation',
- command: [sphinxygen, '-f', '@INPUT0@', 'doc/c/api'],
+ 'c_pugl.rst',
+ command: [sphinxygen, '-f', '@INPUT0@', '@OUTDIR@'],
input: [c_index_xml] + c_rst_files,
output: 'pugl.rst',
)
diff --git a/doc/c/meson.build b/doc/c/meson.build
index 1401aa3..ba14ca9 100644
--- a/doc/c/meson.build
+++ b/doc/c/meson.build
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 David Robillard <d@drobilla.net>
+# Copyright 2021-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
config = configuration_data()
@@ -43,7 +43,7 @@ subdir('xml')
subdir('api')
docs = custom_target(
- 'singlehtml',
+ 'c_singlehtml',
build_by_default: true,
command: [
sphinx_build,
@@ -61,7 +61,7 @@ docs = custom_target(
)
docs = custom_target(
- 'html',
+ 'c_html',
build_by_default: true,
command: [
sphinx_build,
diff --git a/doc/c/xml/meson.build b/doc/c/xml/meson.build
index 8b5e0e2..3e371dc 100644
--- a/doc/c/xml/meson.build
+++ b/doc/c/xml/meson.build
@@ -1,4 +1,4 @@
-# Copyright 2021 David Robillard <d@drobilla.net>
+# Copyright 2021-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
config = configuration_data()
@@ -12,7 +12,7 @@ c_doxyfile = configure_file(
)
c_index_xml = custom_target(
- 'c-index.xml',
+ 'c_index.xml',
command: [doxygen, '@INPUT0@'],
input: [c_doxyfile] + c_headers,
output: 'index.xml',
diff --git a/doc/cpp/api/meson.build b/doc/cpp/api/meson.build
index 9b2f7e6..7f05f42 100644
--- a/doc/cpp/api/meson.build
+++ b/doc/cpp/api/meson.build
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: 0BSD OR ISC
cpp_pugl_rst = custom_target(
- 'C++ API ReST Documentation',
+ 'cpp_pugl.rst',
command: [sphinxygen, '-l', 'cpp', '-f', '@INPUT@', '@OUTDIR@'],
input: cpp_index_xml,
output: 'pugl.rst',
diff --git a/doc/cpp/meson.build b/doc/cpp/meson.build
index ca6bc5b..723510b 100644
--- a/doc/cpp/meson.build
+++ b/doc/cpp/meson.build
@@ -1,4 +1,4 @@
-# Copyright 2021 David Robillard <d@drobilla.net>
+# Copyright 2021-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
config = configuration_data()
@@ -30,7 +30,7 @@ subdir('xml')
subdir('api')
docs = custom_target(
- 'singlehtml',
+ 'cpp_singlehtml',
build_by_default: true,
command: [
sphinx_build,
@@ -48,7 +48,7 @@ docs = custom_target(
)
docs = custom_target(
- 'html',
+ 'cpp_html',
command: [
sphinx_build,
'-M', 'html',
diff --git a/doc/cpp/xml/meson.build b/doc/cpp/xml/meson.build
index 72bb8ee..083a6cc 100644
--- a/doc/cpp/xml/meson.build
+++ b/doc/cpp/xml/meson.build
@@ -1,4 +1,4 @@
-# Copyright 2021 David Robillard <d@drobilla.net>
+# Copyright 2021-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
config = configuration_data()
@@ -12,7 +12,7 @@ cpp_doxyfile = configure_file(
)
cpp_index_xml = custom_target(
- 'cpp-index.xml',
+ 'cpp_index.xml',
command: [doxygen, '@INPUT0@'],
input: [cpp_doxyfile] + c_headers + cpp_headers,
output: 'index.xml',
diff --git a/doc/meson.build b/doc/meson.build
index e7a1763..6368f8a 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,19 +1,25 @@
-# Copyright 2021 David Robillard <d@drobilla.net>
+# Copyright 2021-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
docdir = get_option('datadir') / 'doc'
+# Find required external programs
doxygen = find_program('doxygen', required: get_option('docs'))
-sphinxygen = find_program('sphinxygen', required: false)
sphinx_build = find_program('sphinx-build', required: get_option('docs'))
-if not sphinxygen.found()
- subproject('sphinxygen')
- sphinxygen = find_program('sphinxygen', required: get_option('docs'))
+# Find sphinxygen or fall back to subproject
+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 documentation if all required tools are found
build_docs = doxygen.found() and sphinxygen.found() and sphinx_build.found()
-
if build_docs
subdir('_static')
subdir('c')