build: Add sphinx/breathe support for generating documentation
This is adds basic configuration files for doxygen and for breathe,
which is a doxygen-to-sphinx bridge that can document C symbols.
Breathe is configured with default project 'weston' and implicitly adds
:members: and :undoc-members: to breathe configuration options.
This allows a shorter way to call breathe directives without the need
specify the project and also to display implicitly all the members,
documented or not.
A 'docs' run_target to force the docs to be re-built has been added.
Initially (the first time the build system is ran) the documentation
will automatically be built, but later re-builds will require the use of
the 'docs' target. This avoid further delays in building weston but in
the same time allows the possiblity to update/improve the documentation
bits to those who want that.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
diff --git a/meson.build b/meson.build
index cd75c65..4acdf97 100644
--- a/meson.build
+++ b/meson.build
@@ -161,5 +161,8 @@
configure_file(output: 'config.h', configuration: config_h)
-
-# TODO: process doc/doxygen/*.doxygen.in
+if get_option('doc')
+ subdir('doc/sphinx')
+else
+ message('Documentation will not be built. Use -Ddoc to build it.')
+endif