Skip to content

Commit

Permalink
doc: add JavaDoc to Sphinx
Browse files Browse the repository at this point in the history
Signed-off-by: Noah Watkins <[email protected]>
  • Loading branch information
dotnwat committed Oct 26, 2012
1 parent e572b4b commit e225767
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
22 changes: 20 additions & 2 deletions admin/build-doc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
set -e
cd "$(dirname "$0")"
cd ..
TOPDIR=`pwd`

install -d -m0755 build-doc

if command -v dpkg >/dev/null; then
for package in python-dev python-pip python-virtualenv doxygen ditaa; do
for package in python-dev python-pip python-virtualenv doxygen ditaa ant; do
if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
Expand All @@ -18,7 +19,7 @@ if command -v dpkg >/dev/null; then
exit 1
fi
else
for command in virtualenv doxygen ditaa; do
for command in virtualenv doxygen ditaa ant; do
if ! command -v "$command" >/dev/null; then
# add a space after old values
missing="${missing:+$missing }$package"
Expand Down Expand Up @@ -51,3 +52,20 @@ install -d -m0755 \
output/man
PYTHONPATH=`pwd`/../src/pybind $vdir/bin/sphinx-build -a -b dirhtml -d doctrees ../doc output/html
$vdir/bin/sphinx-build -a -b man -d doctrees ../doc output/man

#
# Build and install JavaDocs
#
JAVADIR=$TOPDIR/src/java

# Clean and build JavaDocs
rm -rf $JAVADIR/doc
ant -buildfile $JAVADIR/build.xml docs

# Create clean target directory
JAVA_OUTDIR=output/html/api/libcephfs-java/javadoc
rm -rf $JAVA_OUTDIR
mkdir $JAVA_OUTDIR

# Copy JavaDocs to target directory
cp -a $JAVADIR/doc/* $JAVA_OUTDIR/
9 changes: 9 additions & 0 deletions doc/api/libcephfs-java.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
===================
Libcephfs (JavaDoc)
===================

..
The admin/build-docs script runs Ant to build the JavaDoc files, and
copies them to api/libcephfs-java/javadoc/.
View the auto-generated `JavaDoc pages for the CephFS Java bindings <javadoc/>`_.
1 change: 1 addition & 0 deletions src/java/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
libcephfs.jar
native/com_ceph_fs_CephMount.h
TEST-*.txt
doc

0 comments on commit e225767

Please sign in to comment.