Skip to content

Commit

Permalink
doc: document build target for PDF
Browse files Browse the repository at this point in the history
This adds to the documentation how to build PDF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
  • Loading branch information
dcpleung authored and nashif committed Sep 11, 2018
1 parent 7a1ec63 commit 1d88e86
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -14,3 +14,6 @@ SPHINXOPTS ?= -q
# ---------------------------------------------------------------------------
htmldocs:
mkdir -p ${BUILDDIR} && cmake -GNinja -DDOC_TAG=${DOC_TAG} -DSPHINXOPTS=${SPHINXOPTS} -B${BUILDDIR} -Hdoc/ && ninja -C ${BUILDDIR} htmldocs

pdfdocs:
mkdir -p ${BUILDDIR} && cmake -GNinja -DDOC_TAG=${DOC_TAG} -DSPHINXOPTS=${SPHINXOPTS} -B${BUILDDIR} -Hdoc/ && ninja -C ${BUILDDIR} pdfdocs
18 changes: 15 additions & 3 deletions doc/README.rst
@@ -1,6 +1,6 @@
.. _zephyr_doc:

Zephyr documentation Generation
Zephyr Documentation Generation
###############################

These instructions will walk you through generating the Zephyr Project's
Expand Down Expand Up @@ -52,6 +52,8 @@ Our documentation processing has been tested to run with:
* Breathe version 4.9.1
* docutils version 0.14
* sphinx_rtd_theme version 0.4.0
* sphinxcontrib-svg2pdfconverter version 0.1.0
* Latexmk version version 4.56

In order to install the documentation tools, clone a copy of the git repository
for the Zephyr project and set up your development environment as described in
Expand Down Expand Up @@ -98,14 +100,19 @@ folder, here are the commands to generate the html content locally:
# Use cmake to configure a Ninja-based build system:
cmake -GNinja ..
# Now run ninja on the generated build system:
# To generate HTML output, run ninja on the generated build system:
ninja htmldocs
# If you modify or add .rst files, run ninja again:
ninja htmldocs
# To generate PDF output, run ninja on the generated build system:
ninja pdfdocs
Depending on your development system, it will take up to 15 minutes to
collect and generate the HTML content. When done, you can view the HTML
output with your browser started at ``doc/_build/html/index.html``
output with your browser started at ``doc/_build/html/index.html`` and
the PDF file is available at ``doc/_build/pdf/zephyr.pdf``.

If you want to build the documentation from scratch just delete the contents
of the build folder and run ``cmake`` and then ``ninja`` again.
Expand All @@ -118,8 +125,13 @@ there:
cd ~/zephyr
source zephyr-env.sh
# To generate HTML output
make htmldocs
# To generate PDF output
make pdfdocs
Filtering expected warnings
***************************

Expand Down

0 comments on commit 1d88e86

Please sign in to comment.