]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
admin/build-doc: support optional argument for specifying sphinx builders 18166/head
authorKefu Chai <kchai@redhat.com>
Tue, 21 Mar 2017 04:22:57 +0000 (12:22 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 8 Oct 2017 10:23:08 +0000 (18:23 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5b9ec53512cb8119db3af335283445ac972053b7)

Conflicts:
admin/build-doc: trivial resolution

admin/build-doc
doc/start/documenting-ceph.rst

index 68e5772b1e97e9739824bd8f0be599fb0e14ff8d..321fa2c9dd275ee935ecc14412d53965c09db10f 100755 (executable)
@@ -111,8 +111,24 @@ nm $vdir/lib/python*/*-packages/cephfs.so | grep 'U cephfs_' | \
 rm -f $TOPDIR/src/pybind/rbd/rados.pxd $TOPDIR/src/pybind/cephfs/rados.pxd
 
 
-$vdir/bin/sphinx-build -a -n -b dirhtml -d doctrees $TOPDIR/doc $TOPDIR/build-doc/output/html
-$vdir/bin/sphinx-build -a -b 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 2d09db3ae3a0e4298ab8c5f10d0668ee05eae01c..0bb795fb12ef26e2ef996a495fa0fc21538ac081 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