Skip to content

Commit

Permalink
Integrate Doxygen into Sphinx docs.
Browse files Browse the repository at this point in the history
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
  • Loading branch information
Tommi Virtanen committed Aug 30, 2011
1 parent f1d8964 commit afede55
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 2 deletions.
19 changes: 19 additions & 0 deletions Doxyfile
@@ -0,0 +1,19 @@
PROJECT_NAME = Ceph
OUTPUT_DIRECTORY = build-doc/doxygen
STRIP_FROM_PATH = src/
STRIP_FROM_INC_PATH = src/include
BUILTIN_STL_SUPPORT = YES
SYMBOL_CACHE_SIZE = 2
WARN_IF_UNDOCUMENTED = NO
INPUT = src
RECURSIVE = YES
EXCLUDE = src/gtest \
src/test/virtualenv \
src/out
VERBATIM_HEADERS = NO
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_XML = YES
XML_PROGRAMLISTING = NO
HAVE_DOT = YES
DOT_TRANSPARENT = YES
18 changes: 17 additions & 1 deletion admin/build-doc
Expand Up @@ -3,10 +3,15 @@ set -e
cd "$(dirname "$0")"
cd ..

install -d -m0755 build-doc

if [ ! -e build-doc/doxygen/xml ]; then
doxygen
fi

dia --filter=png-libart --export=doc/overview.png.tmp doc/overview.dia
mv -- doc/overview.png.tmp doc/overview.png

install -d -m0755 build-doc
cd build-doc

if [ ! -e virtualenv ]; then
Expand All @@ -16,6 +21,17 @@ if [ ! -x virtualenv/bin/sphinx-build ]; then
./virtualenv/bin/pip install sphinx
fi

# ugly kludge until breathe is distutils-friendly
install -d breathe
cd breathe
if [ ! -e .git ]; then
git init
fi
if [ -z "$(git rev-parse --default HEAD)" ]; then
git pull --ff-only https://github.com/michaeljones/breathe.git master
fi
cd ..

install -d -m0755 \
output/html \
output/man
Expand Down
8 changes: 8 additions & 0 deletions doc/api/index.rst
@@ -0,0 +1,8 @@
===================
API documentation
===================

.. toctree::
:glob:

*
9 changes: 9 additions & 0 deletions doc/api/librados.rst
@@ -0,0 +1,9 @@
==============
Librados (C)
==============

.. doxygenfunction:: rados_pool_list

.. doxygenfunction:: rados_create_with_context

.. todo:: write me!
8 changes: 8 additions & 0 deletions doc/api/libradospp.rst
@@ -0,0 +1,8 @@
==================
LibradosPP (C++)
==================

.. doxygenclass:: librados::RadosClient
:members:

.. todo:: write me!
12 changes: 11 additions & 1 deletion doc/conf.py
Expand Up @@ -17,7 +17,12 @@
html_use_smartypants = True
html_show_sphinx = False

extensions = ['sphinx.ext.todo']
# ugly kludge until breathe is distutils-friendly
import sys; sys.path.append('../build-doc/breathe')
extensions = [
'sphinx.ext.todo',
'breathe',
]
todo_include_todos = True

def _get_manpages():
Expand Down Expand Up @@ -56,3 +61,8 @@ def _get_manpages():
)

man_pages = list(_get_manpages())

breathe_default_project = 'ceph'
breathe_projects = dict(
ceph='doxygen/xml',
)
1 change: 1 addition & 0 deletions doc/index.rst
Expand Up @@ -92,6 +92,7 @@ Table of Contents
tutorial
architecture
ops/index
api/index
man/index
papers
glossary
Expand Down

0 comments on commit afede55

Please sign in to comment.