From b6064277387bc78e0f19014839f2b6c8131d4177 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 21 Mar 2017 12:22:57 +0800 Subject: [PATCH] admin/build-doc: support optional argument for specifying sphinx builders Signed-off-by: Kefu Chai (cherry picked from commit 5b9ec53512cb8119db3af335283445ac972053b7) Conflicts: admin/build-doc: trivial resolution --- admin/build-doc | 20 ++++++++++++++++++-- doc/start/documenting-ceph.rst | 10 +++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/admin/build-doc b/admin/build-doc index 68e5772b1e97..321fa2c9dd27 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -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 diff --git a/doc/start/documenting-ceph.rst b/doc/start/documenting-ceph.rst index 2d09db3ae3a0..0bb795fb12ef 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 -- 2.47.3