From: Kefu Chai Date: Tue, 21 Mar 2017 04:22:57 +0000 (+0800) Subject: admin/build-doc: support optional argument for specifying sphinx builders X-Git-Tag: v12.0.1~16^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b9ec53512cb8119db3af335283445ac972053b7;p=ceph.git admin/build-doc: support optional argument for specifying sphinx builders Signed-off-by: Kefu Chai --- diff --git a/admin/build-doc b/admin/build-doc index 2a0c2cc95e1d..fb5eaebf94bd 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -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 diff --git a/doc/start/documenting-ceph.rst b/doc/start/documenting-ceph.rst index 3ff072137f04..ee96277b535b 100644 --- a/doc/start/documenting-ceph.rst +++ b/doc/start/documenting-ceph.rst @@ -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