summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-12-13 15:03:47 -0600
committerFederico Mena Quintero <federico@gnome.org>2022-12-13 15:03:47 -0600
commit149be314f5bcd650165b8f71dd364c80f0d4d634 (patch)
tree7907d18f610125238c418821b915d577e731fa00
parent23b7dbb0bef30be606eb7fc997b1670757ed505a (diff)
downloadat-spi2-core-149be314f5bcd650165b8f71dd364c80f0d4d634.tar.gz
devel-docs: Copy the rst source files to the build_dir to make sphinx happy
Sphinx doesn't seem to easily support these * source_dir vs. build_dir * generated files in build_dir... * ... that get referenced from the sources in source_dir We can hack around this by copying the source files to build_dir, next to the generated files, and doing the build of the docs from there.
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--devel-docs/meson.build15
2 files changed, 12 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e959de65..5b104070 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -188,7 +188,7 @@ reference:
- mkdir _reference
- mv _build/doc/libatspi _reference/libatspi
- mv _build/doc/atk _reference/atk
- - mv _build/devel-docs/devel-docs _reference/devel-docs
+ - mv _build/devel-docs/html _reference/devel-docs
artifacts:
paths:
- _reference
diff --git a/devel-docs/meson.build b/devel-docs/meson.build
index 4b293e11..0e91f9da 100644
--- a/devel-docs/meson.build
+++ b/devel-docs/meson.build
@@ -36,10 +36,17 @@ docs_sources = [
'xml-interfaces.rst',
]
+# sphinx-build(1) does not seem to easily support generated files in the build directory.
+# So, we'll copy all the source files from the source directory to the build directory,
+# and just do the build from there.
+copied_docs_sources = []
+foreach i: docs_sources
+ copied_docs_sources += fs.copyfile(i)
+endforeach
+
custom_target(
'devel_docs',
- input: docs_sources + interfaces_rst,
- output: 'devel-docs',
- command: [ sphinx_build, meson.current_source_dir(), '@OUTPUT@' ],
- env: { 'MESON_CURRENT_BUILD_DIR': meson.current_build_dir() }
+ input: copied_docs_sources + interfaces_rst,
+ output: 'html',
+ command: [ sphinx_build, meson.current_build_dir(), '@OUTPUT@' ],
)