From cc375fe739958b31a749f3d37e67e5d7e1a33aec Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 15 Jan 2014 17:36:17 -0500 Subject: 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 --- source/conf.py | 15 +++++++++++++-- 1 file 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' -- cgit v1.2.3