forked from drath/libratbag
doc: drop the libratbag-enums.h from the documentation
The various enums are now documented separately for the DBus API Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -125,7 +125,7 @@ doc_build: &doc_build
|
||||
- *fedora_install
|
||||
- run:
|
||||
name: Install documentation build-deps
|
||||
command: dnf install -y python3-sphinx python3-sphinx_rtd_theme doxygen libxslt
|
||||
command: dnf install -y python3-sphinx python3-sphinx_rtd_theme
|
||||
- checkout
|
||||
- *build_with_docs
|
||||
- *export_logs
|
||||
|
||||
@@ -28,8 +28,6 @@ must be prepared to receive a :func:`org.freedesktop.ratbag1.Device.Resync
|
||||
|
||||
Notes on the DBus API
|
||||
---------------------
|
||||
Values listed as enums are defined in `libratbag-enums.h
|
||||
<https://github.com/libratbag/libratbag/blob/master/src/libratbag-enums.h>`_
|
||||
|
||||
For easier debugging, objects paths are constructed from the device. e.g.
|
||||
``/org/freedesktop/ratbag/button/event5/p0/b10`` is the button interface for
|
||||
|
||||
@@ -15,7 +15,6 @@ The libratbag DBus API
|
||||
:caption: Contents:
|
||||
|
||||
The DBus Interfaces <dbus.rst>
|
||||
Enumerations <enums.rst>
|
||||
|
||||
This document describes the DBus API that is the public interface for
|
||||
libratbag.
|
||||
|
||||
@@ -1,53 +1,22 @@
|
||||
if get_option('documentation')
|
||||
|
||||
cmd_sphinx = find_program('sphinx-build-3', 'sphinx-build3')
|
||||
cmd_doxygen = find_program('doxygen')
|
||||
cmd_xsltproc = find_program('xsltproc')
|
||||
|
||||
doc_config = configuration_data()
|
||||
doc_config.set('PACKAGE_NAME', meson.project_name())
|
||||
doc_config.set('PACKAGE_VERSION', meson.project_version())
|
||||
doc_config.set('top_srcdir', meson.source_root())
|
||||
|
||||
# We have a dependency chain here:
|
||||
# - generate doxygen xml from the source
|
||||
# - convert the xml to rst with xstlproc
|
||||
# - generate the sphinx conf
|
||||
# - run sphinx against the generated rst
|
||||
doxyfile = configure_file(input : 'libratbag.doxygen.in',
|
||||
output : 'libratbag.doxygen',
|
||||
configuration : doc_config,
|
||||
install : false)
|
||||
|
||||
src_doxygen = [ doxyfile,
|
||||
files('../src/libratbag-enums.h') ]
|
||||
doxygen = custom_target('doxygen',
|
||||
input : src_doxygen,
|
||||
output : [ 'xml' ],
|
||||
command : [ cmd_doxygen, doxyfile ],
|
||||
install : false,
|
||||
build_by_default : true)
|
||||
|
||||
|
||||
# Sphinx really really wants a _static directory in its source tree. Let's
|
||||
# make it happy
|
||||
run_command('mkdir', '-p', join_paths(meson.build_root(), 'doc', '_static'))
|
||||
|
||||
xsl = join_paths(meson.source_root(), 'doc', 'doxygen-enums-to-rst.xsl')
|
||||
src_xsltproc = join_paths(meson.build_root(), 'xml', 'group__enums.xml')
|
||||
dst_xstlproc = join_paths(meson.build_root(), 'doc', 'enums.rst')
|
||||
rst_enum = custom_target('xsltproc',
|
||||
input : doxygen,
|
||||
output : 'enums.rst',
|
||||
command: [ cmd_xsltproc, '-o', dst_xstlproc, xsl, src_xsltproc],
|
||||
build_by_default : true)
|
||||
|
||||
# Effectively a noop copy. We *must* generate enums.rst so that will end up
|
||||
# in the build directory. sphinx doesn't allow for multiple source
|
||||
# directories, so any .rst and the conf.py must be copied over to the
|
||||
# build directory too
|
||||
src_rsts = ['index.rst', 'dbus.rst']
|
||||
dst_rsts = [rst_enum]
|
||||
dst_rsts = []
|
||||
foreach rst : src_rsts
|
||||
f = configure_file(input : rst,
|
||||
output : rst,
|
||||
|
||||
Reference in New Issue
Block a user