Commit 0fcfaab0 authored by sbc@chromium.org's avatar sbc@chromium.org

Minor cleanups for SDK devsite docs.

Add -W to SHPINXOPTS to make warnings into error.

Add presubmit check that makes sure sphinx is happy
with the content.

Use 2 spaces to indent code.

Add a missing document.

Fix document links in examples.rst.

Use 'out' for build product data to be constent with
chrome and native_client.

Add 'all' target so that 'make' on its own will work
(I'm lazy)

R=binji@chromium.org, eliben@chromium.org

Review URL: https://codereview.chromium.org/23531031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221806 0039d316-1c4b-4281-b951-d872f2087c98
parent 191dbef8
......@@ -2,7 +2,7 @@
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
......@@ -19,7 +19,9 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext all
all: devsite
help:
@echo "Please use \`make <target>' where <target> is one of"
......
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import subprocess
def _CheckSphinxBuild(input_api, output_api):
"""Check that the docs are buildable without any warnings.
This check runs sphinx-build with -W so that warning are errors.
"""
try:
subprocess.check_output(['make', 'SPHINXOPTS=-Wa'])
except subprocess.CalledProcessError as e:
return [output_api.PresubmitPromptError('sphinx_build failed:\n' +
e.output)]
return []
def CommonChecks(input_api, output_api):
output = []
output.extend(_CheckSphinxBuild(input_api, output_api))
return output
def CheckChangeOnUpload(input_api, output_api):
return CommonChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return CommonChecks(input_api, output_api)
......@@ -23,24 +23,24 @@ How to build
To build the docs you will needs sphinx installed (and sphinx-build in your
path), and simply run:
make devsite
make
To rebuild all the pages always, add 'SPHINXOPTS=-a', e.g.:
make SPHINXOPTS=-a devsite
make SPHINXOPTS=-a
To emit local-testing mode, instead of production mode, add:
SPHINXOPTS='-D devsite_production_mode=0'
e.g.:
make SPHINXOPTS='-D devsite_production_mode=0' devsite
make SPHINXOPTS='-D devsite_production_mode=0'
Production mode contains devsite-specific templating and non-HTML constructs.
The builder prints out the value of this setting - make sure it's what you
expect it to be. For example:
$ make devsite
$ make
sphinx-build -b devsite -d _build/doctrees . _build/devsite
Running Sphinx v1.2b1
loading pickled environment... done
......
......@@ -294,6 +294,7 @@ Additional considerations for a packaged application
example:
.. naclcode::
:prettyprint: 0
"launch": {
"web_url": "http://mail.google.com/mail/"
......
......@@ -18,10 +18,12 @@ Contents:
devguide/devcycle/building.rst
devguide/devcycle/running.rst
devguide/devcycle/debugging.rst
devguide/coding/3D-graphics.rst
devguide/coding/audio.rst
devguide/coding/application-structure.rst
devguide/coding/FileIO.rst
devguide/coding/message-system.rst
devguide/coding/progress-events.rst
devguide/distributing.rst
community/application-gallery.rst
peppercpp/index.rst
......@@ -152,7 +152,7 @@ Overview <../overview>`.
For details on how to use ``make``, see the `GNU 'make' Manual
<http://www.gnu.org/software/make/manual/make.html>`_. For details on how to
use the SDK toolchain itself, see :doc:`Building Native Client Modules
<devcycle/building>`.
<../devguide/devcycle/building>`.
Run the SDK examples
--------------------
......@@ -241,7 +241,7 @@ Chrome is listening on. GDB will respond::
At this point, you can use the standard GDB commands to debug your NaCl module.
The most common commands you will use to debug are ``continue``, ``step``,
``next``, ``break`` and ``backtrace``. See :doc:`Debugging
<devcycle/debugging>` for more information about debugging a Native Client
<../devguide/devcycle/debugging>` for more information about debugging a Native Client
application.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment