aboutsummaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2014-01-15 17:36:17 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2014-01-15 17:36:17 -0500
commitcc375fe739958b31a749f3d37e67e5d7e1a33aec (patch)
treeb70061f75f173fe1782b88025dca5c1dc926a382 /source
parentd61ffac0fe6b24a85fcba1deb5620a292c8d4117 (diff)
downloadlibrambutan-cc375fe739958b31a749f3d37e67e5d7e1a33aec.tar.gz
librambutan-cc375fe739958b31a749f3d37e67e5d7e1a33aec.zip
conf.py: allow doxygen XML output in repository root
It's a pain to have to re-make the XML output for a given release, and there's a chance it'll change between different versions of Doxygen. So look for Doxygen XML output in doxygen/xml/ relative to the repository root. This allows maintenance branches to check in the XML for their version of libmaple. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'source')
-rw-r--r--source/conf.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/conf.py b/source/conf.py
index 5b8f2d8..f4a9bbb 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -13,6 +13,7 @@
# serve to show the default.
import sys, os
+import os.path
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -266,7 +267,17 @@ man_pages = [
# -- Options for breathe integration ------------------------------------------
-breathe_projects = {'libmaple' : os.path.join(os.environ['LIB_MAPLE_HOME'],
- 'doxygen', 'xml')}
+# We allow people to check in Doxygen XML into maintenance branches.
+doxygen_xml_maybe = os.path.join(os.path.dirname(os.path.dirname(__file__)),
+ 'doxygen', 'xml')
+if os.path.isdir(doxygen_xml_maybe):
+ # There's a doxygen/xml/ directory in this repository root, use that.
+ doxygen_xml_dir = doxygen_xml_maybe
+else:
+ # Nothing there, assume it's in LIB_MAPLE_HOME.
+ doxygen_xml_dir = os.path.join(os.environ['LIB_MAPLE_HOME'],
+ 'doxygen', 'xml')
+
+breathe_projects = {'libmaple' : doxygen_xml_dir}
breathe_default_project = 'libmaple'