gdbus-codegen integration for D-Bus API documentation
@pwithnall
Submitted by Philip Withnall Link to original bug (#743294)
Description
Currently, people have to write their own build rules for generating Docbook files from D-Bus interface XML files using gdbus-codegen. They then have to tie that in to gtk-doc in the docs.xml file and gtk-doc.make.
It would be useful if there were a macro which made this easier. It could either come with GDBus, in which case the integration with gtk-doc would have to be very loose, or it could come with gtk-doc. I suggest the latter, but it could be argued either way.
Proposal:
- Add a DOC_DBUS_INTERFACE_XML input variable to gtk-doc.make. Add a DOC_DBUS_INTERFACE_PREFIX variable too.
- For each of the listed files, it runs
gdbus-codegen --interface-prefix
(DOC_DBUS_INTERFACE_PREFIX) --xml-files=
(xml_file) and puts the output in $(builddir)/xml - Build dependencies are updated so documentation is correctly regenerated if any of the interfaces change. The interface output files should be cleaned as appropriate.
- gtkdoc-check is updated to check that all DOC_DBUS_INTERFACE_XML files are xi:included into $(DOC_MAIN_SGML_FILE).