aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-09-02 17:07:14 -0400
committerDavid Robillard <d@drobilla.net>2023-09-22 23:54:50 -0400
commit15e75b4b6b302c8a12a799dd008f756437cea60d (patch)
tree87107dcbc5194d58c070915976068fca5c39c6c1 /doc
parentf2e5a661cbb6022b60104173990450782aa6ac14 (diff)
downloadserd-15e75b4b6b302c8a12a799dd008f756437cea60d.tar.gz
serd-15e75b4b6b302c8a12a799dd008f756437cea60d.tar.bz2
serd-15e75b4b6b302c8a12a799dd008f756437cea60d.zip
Clean up sphinx build commands
Diffstat (limited to 'doc')
-rw-r--r--doc/html/meson.build10
-rw-r--r--doc/meson.build4
-rw-r--r--doc/singlehtml/meson.build14
3 files changed, 19 insertions, 9 deletions
diff --git a/doc/html/meson.build b/doc/html/meson.build
index a6f1d6fe..d97d368b 100644
--- a/doc/html/meson.build
+++ b/doc/html/meson.build
@@ -8,10 +8,12 @@ html_dir = docdir / versioned_name / 'html'
custom_target(
'html',
build_by_default: true,
- command: [
- sphinx_build, '-M', 'html', '@OUTDIR@' / '..', '@OUTDIR@' / '..',
+ command: sphinx_build_command + [
+ '-b', 'html',
'-t', 'html',
- ] + sphinx_flags,
+ sphinx_in_dir,
+ '@OUTDIR@',
+ ],
input: [c_rst_files, c_serd_rst, c_index_xml, conf_py],
install: true,
install_dir: html_dir,
@@ -25,5 +27,5 @@ custom_target(
)
if not meson.is_subproject()
- summary('Paginated HTML', get_option('prefix') / html_dir, section: 'Directories')
+ summary('HTML', get_option('prefix') / html_dir, section: 'Directories')
endif
diff --git a/doc/meson.build b/doc/meson.build
index 95488fc0..0a706dc2 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -59,12 +59,14 @@ if build_docs
subdir('api')
# Build strict Sphinx flags, with termination on warnings if werror=true
- sphinx_flags = ['-E', '-a', '-q']
+ sphinx_in_dir = meson.current_build_dir()
+ sphinx_flags = ['-d', sphinx_in_dir / '.doctrees', '-E', '-a', '-q']
if get_option('werror')
sphinx_flags += ['-W']
endif
# Run Sphinx to generate final documentation for each format
+ sphinx_build_command = [sphinx_build] + sphinx_flags
foreach format : ['html', 'singlehtml']
if not get_option(format).disabled()
subdir(format)
diff --git a/doc/singlehtml/meson.build b/doc/singlehtml/meson.build
index a15a69ec..47ecb9f8 100644
--- a/doc/singlehtml/meson.build
+++ b/doc/singlehtml/meson.build
@@ -8,10 +8,12 @@ singlehtml_dir = docdir / versioned_name / 'singlehtml'
custom_target(
'singlehtml',
build_by_default: true,
- command: [
- sphinx_build, '-M', 'singlehtml', '@OUTDIR@' / '..', '@OUTDIR@' / '..',
+ command: sphinx_build_command + [
+ '-b', 'singlehtml',
'-t', 'singlehtml',
- ] + sphinx_flags,
+ sphinx_in_dir,
+ '@OUTDIR@',
+ ],
input: [c_rst_files, c_serd_rst, c_index_xml, conf_py],
install: true,
install_dir: singlehtml_dir,
@@ -22,5 +24,9 @@ custom_target(
)
if not meson.is_subproject()
- summary('Unified HTML', get_option('prefix') / singlehtml_dir, section: 'Directories')
+ summary(
+ 'Single HTML',
+ get_option('prefix') / singlehtml_dir,
+ section: 'Directories',
+ )
endif