]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
admin/build-doc: support optional argument for specifying sphinx builders
authorKefu Chai <kchai@redhat.com>
Tue, 21 Mar 2017 04:22:57 +0000 (12:22 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 21 Mar 2017 05:47:05 +0000 (13:47 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
admin/build-doc
doc/start/documenting-ceph.rst

index 2a0c2cc95e1d35704c5ca5a3da34976b6b6bba28..fb5eaebf94bd5cfc89257988c107273093decde6 100755 (executable)
@@ -96,8 +96,24 @@ for bind in rados rbd cephfs rgw; do
     fi
 done
 
-$vdir/bin/sphinx-build -a -n -b dirhtml -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/html
-$vdir/bin/sphinx-build -a -b man -t man -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/man
+if [ -z "$@" ]; then
+    sphinx_targets="html man"
+else
+    sphinx_targets=$@
+fi
+for target in $sphinx_targets; do
+    builder=$target
+    case $target in
+        html)
+            builder=dirhtml
+            ;;
+        man)
+            extra_opt="-t man"
+            ;;
+    esac
+    $vdir/bin/sphinx-build -a -b $builder $extra_opt -d doctrees \
+                           $TOPDIR/doc $TOPDIR/build-doc/output/$target
+done
 
 #
 # Build and install JavaDocs
index 3ff072137f0493ddd4e72112832ec2292cfc0546..ee96277b535b56c624d2c1b1f0d10f989033b7c7 100644 (file)
@@ -184,17 +184,13 @@ To build the documentation, navigate to the ``ceph`` repository directory::
 
        cd ceph
 
-To build the documentation on Debian/Ubuntu, execute::
+To build the documentation on Debian/Ubuntu, Fedora, or CentOS/RHEL, execute::
 
        admin/build-doc
 
-To build the documentation on Fedora, execute::
+To scan for the reachablity of external links, execute::
 
-       admin/build-doc
-
-To build the documentation on CentOS/RHEL, execute::
-
-       admin/build-doc
+       admin/build-doc linkcheck
 
 Executing ``admin/build-doc`` will create a ``build-doc`` directory under ``ceph``.
 You may need to create a directory under ``ceph/build-doc`` for output of Javadoc