summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Virtanen <tommi.virtanen@dreamhost.com>2011-08-29 15:43:41 -0700
committerTommi Virtanen <tommi.virtanen@dreamhost.com>2011-08-29 17:27:14 -0700
commitafede55c83f8213ef7678144f7d4ed947b154244 (patch)
treef6471db08a4f99bad12430919de64518c3fec511
parentf1d89644998e227319fcafb44f0f3a17df502f5a (diff)
downloadceph-afede55c83f8213ef7678144f7d4ed947b154244.tar.gz
Integrate Doxygen into Sphinx docs.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
-rw-r--r--Doxyfile19
-rwxr-xr-xadmin/build-doc18
-rw-r--r--doc/api/index.rst8
-rw-r--r--doc/api/librados.rst9
-rw-r--r--doc/api/libradospp.rst8
-rw-r--r--doc/conf.py12
-rw-r--r--doc/index.rst1
7 files changed, 73 insertions, 2 deletions
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 00000000000..0545c06d0e6
--- /dev/null
+++ b/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
diff --git a/admin/build-doc b/admin/build-doc
index fd1afe5c365..aee1a48345c 100755
--- a/admin/build-doc
+++ b/admin/build-doc
@@ -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
@@ -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
diff --git a/doc/api/index.rst b/doc/api/index.rst
new file mode 100644
index 00000000000..ace387b7984
--- /dev/null
+++ b/doc/api/index.rst
@@ -0,0 +1,8 @@
+===================
+ API documentation
+===================
+
+.. toctree::
+ :glob:
+
+ *
diff --git a/doc/api/librados.rst b/doc/api/librados.rst
new file mode 100644
index 00000000000..7d9e7ff8622
--- /dev/null
+++ b/doc/api/librados.rst
@@ -0,0 +1,9 @@
+==============
+ Librados (C)
+==============
+
+.. doxygenfunction:: rados_pool_list
+
+.. doxygenfunction:: rados_create_with_context
+
+.. todo:: write me!
diff --git a/doc/api/libradospp.rst b/doc/api/libradospp.rst
new file mode 100644
index 00000000000..efa340abc22
--- /dev/null
+++ b/doc/api/libradospp.rst
@@ -0,0 +1,8 @@
+==================
+ LibradosPP (C++)
+==================
+
+.. doxygenclass:: librados::RadosClient
+ :members:
+
+.. todo:: write me!
diff --git a/doc/conf.py b/doc/conf.py
index e8b7b6faa61..b711c5247e1 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -17,7 +17,12 @@ html_static_path = ['_static']
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():
@@ -56,3 +61,8 @@ def _get_manpages():
)
man_pages = list(_get_manpages())
+
+breathe_default_project = 'ceph'
+breathe_projects = dict(
+ ceph='doxygen/xml',
+ )
diff --git a/doc/index.rst b/doc/index.rst
index 507f5a035c0..8397157d781 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -92,6 +92,7 @@ Table of Contents
tutorial
architecture
ops/index
+ api/index
man/index
papers
glossary