diff options
Diffstat (limited to 'devel-docs/meson.build')
-rw-r--r-- | devel-docs/meson.build | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/devel-docs/meson.build b/devel-docs/meson.build index d8978fcc..b405df4f 100644 --- a/devel-docs/meson.build +++ b/devel-docs/meson.build @@ -6,37 +6,79 @@ sphinx_build = find_program('sphinx-build', native: true, required: get_option('docs')) -interfaces_rst_sources = [] +# Gather the XML files, prefixed by the "xml/" directory name +# introspection_sources comes from xml/meson.build interfaces_xml = [] - foreach i: introspection_sources - # /foo/bar/baz.xml -> doc-baz.rst - doc_name = 'doc-' + fs.replace_suffix(fs.name(i), '.rst') - interfaces_rst_sources += doc_name - interfaces_xml += join_paths(meson.project_source_root(), 'xml', i) endforeach +# gdbus-codegen can take an dbus.xml file and generate various interfaces +# from it, named as some_prefix-org.foo.InterfaceName.rst +# We need an explicit list of those; for example, xml/Event.xml contains +# various interfaces and so we can't just substitute "xml" for "rst". +interfaces_rst_sources = [ + 'doc-org.a11y.atspi.Accessible.rst', + 'doc-org.a11y.atspi.Action.rst', + 'doc-org.a11y.atspi.Application.rst', + 'doc-org.a11y.atspi.Cache.rst', + 'doc-org.a11y.atspi.Collection.rst', + 'doc-org.a11y.atspi.Component.rst', + 'doc-org.a11y.atspi.DeviceEventController.rst', + 'doc-org.a11y.atspi.DeviceEventListener.rst', + 'doc-org.a11y.atspi.Document.rst', + 'doc-org.a11y.atspi.EditableText.rst', + 'doc-org.a11y.atspi.Event.Document.rst', + 'doc-org.a11y.atspi.Event.Focus.rst', + 'doc-org.a11y.atspi.Event.Keyboard.rst', + 'doc-org.a11y.atspi.Event.Mouse.rst', + 'doc-org.a11y.atspi.Event.Object.rst', + 'doc-org.a11y.atspi.Event.Terminal.rst', + 'doc-org.a11y.atspi.Event.Window.rst', + 'doc-org.a11y.atspi.Hyperlink.rst', + 'doc-org.a11y.atspi.Hypertext.rst', + 'doc-org.a11y.atspi.Image.rst', + 'doc-org.a11y.atspi.Registry.rst', + 'doc-org.a11y.atspi.Selection.rst', + 'doc-org.a11y.atspi.Socket.rst', + 'doc-org.a11y.atspi.Table.rst', + 'doc-org.a11y.atspi.TableCell.rst', + 'doc-org.a11y.atspi.Text.rst', + 'doc-org.a11y.atspi.Value.rst', +] + +# The 'devel-docs/doc' here is a prefix that gdbus-codegen will put in front +# of the interface names that it finds in the input XML files. interfaces_rst = custom_target( 'interfaces_rst', input: interfaces_xml, output: interfaces_rst_sources, - command: [ gdbus_codegen, '--generate-rst', 'doc', '@INPUT@'] + command: [ gdbus_codegen, '--generate-rst', 'devel-docs/doc', '@INPUT@'] ) docs_sources = [ 'atk-deprecations.rst', + 'conf.py', 'de-controller.rst', 'gitlab-ci.rst', 'index.rst', 'roadmap.rst', 'toolkits.rst', 'xml-changes.rst', + '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@' ], + input: copied_docs_sources + interfaces_rst, + output: 'html', + command: [ sphinx_build, meson.current_build_dir(), '@OUTPUT@' ], ) |