summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-18 00:33:35 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-18 00:33:35 +0000
commit1a60a8aee7810903a2ed6ac1fef33e8d0c0ba305 (patch)
treeddd92e8b835a9bb61ad3fa26c60ff052632671ee /native_client_sdk/src
parente22d746bc9f1952416e074eec23f5d596b7b8315 (diff)
downloadchromium_src-1a60a8aee7810903a2ed6ac1fef33e8d0c0ba305.zip
chromium_src-1a60a8aee7810903a2ed6ac1fef33e8d0c0ba305.tar.gz
chromium_src-1a60a8aee7810903a2ed6ac1fef33e8d0c0ba305.tar.bz2
[NaCl SDK Docs] Move output directory of docs for Chromesite.
The directory required is native_client_sdk/src/doc/_developer.chrome.com_generated This will be polled regularly by Chromesite, and if changed will be updated automatically. To keep this CL simple, I haven't checked in the generated docs. A few other changes/fixes: * Modified the doc Makefile to add `chromesite_rst` target (for just building ReST), and a `serve_chromesite` target for running the Chromesite preview server. * Fixed a couple of dead links in the .rst files * Add a os.chdir to generate_docs.py so it works properly when run from a different working directory. No trybots as this is a doc-only change. BUG=none R=awatson@chromium.org, sbc@chromium.org Review URL: https://codereview.chromium.org/131563003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245677 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src')
-rw-r--r--native_client_sdk/src/doc/Makefile17
-rw-r--r--native_client_sdk/src/doc/PRESUBMIT.py4
-rwxr-xr-xnative_client_sdk/src/doc/doxygen/generate_docs.py17
-rw-r--r--native_client_sdk/src/doc/overview.rst2
-rw-r--r--native_client_sdk/src/doc/quick-start.rst2
5 files changed, 28 insertions, 14 deletions
diff --git a/native_client_sdk/src/doc/Makefile b/native_client_sdk/src/doc/Makefile
index 49c18bc..563af42 100644
--- a/native_client_sdk/src/doc/Makefile
+++ b/native_client_sdk/src/doc/Makefile
@@ -6,6 +6,7 @@ SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
+CHROMESITE_BUILDDIR = _developer.chrome.com_generated
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
@@ -49,9 +50,10 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " devsite build locally viewable version of docs for developers.google.com"
@echo " devsite-prod build production docs for developers.google.com"
- @echo " chromesite build locally viewable version of docs for developer.chrome.com"
- @echo " chromesite-prod build production docs for developer.chrome.com"
@echo " serve start python web server on port server 8009"
+ @echo " chromesite build docs for developer.chrome.com"
+ @echo " chromesite_rst only build .rst docs; no doxygen"
+ @echo " serve_chromesite start python web server for chromesite docs"
clean:
rm -rf $(BUILDDIR)/*
@@ -205,10 +207,17 @@ devsite:
@echo "Build finished. The HTML pages are in $(BUILDDIR)/devsite."
chromesite:
- $(SPHINXBUILD) -b chromesite $(ALLSPHINXOPTS) $(BUILDDIR)/chromesite
+ doxygen/generate_docs.py
+ $(SPHINXBUILD) -b chromesite $(ALLSPHINXOPTS) $(CHROMESITE_BUILDDIR)
@echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/chromesite."
+ @echo "Build finished. The HTML pages are in $(CHROMESITE_BUILDDIR)"
+
+chromesite_rst:
+ $(SPHINXBUILD) -b chromesite $(ALLSPHINXOPTS) $(CHROMESITE_BUILDDIR)
serve:
cd _build/devsite && python -m SimpleHTTPServer 8009
+
+serve_chromesite:
+ ../../../chrome/common/extensions/docs/server2/preview.py
diff --git a/native_client_sdk/src/doc/PRESUBMIT.py b/native_client_sdk/src/doc/PRESUBMIT.py
index 2b0d273..c3001a9 100644
--- a/native_client_sdk/src/doc/PRESUBMIT.py
+++ b/native_client_sdk/src/doc/PRESUBMIT.py
@@ -14,7 +14,9 @@ def _CheckSphinxBuild(input_api, output_api):
"""
try:
- subprocess.check_output(['make', 'SPHINXOPTS=-Wa'],
+ # Don't do a full chromesite build (takes about a minute...), just build
+ # the ReST.
+ subprocess.check_output(['make', 'chromesite_rst', 'SPHINXOPTS=-Wa'],
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
return [output_api.PresubmitNotifyResult('sphinx_build failed:\n' +
diff --git a/native_client_sdk/src/doc/doxygen/generate_docs.py b/native_client_sdk/src/doc/doxygen/generate_docs.py
index 1bf1aa6..979f806 100755
--- a/native_client_sdk/src/doc/doxygen/generate_docs.py
+++ b/native_client_sdk/src/doc/doxygen/generate_docs.py
@@ -158,16 +158,17 @@ def RunRstIndex(kind, channel, pepper_version, out_dirname, out_rst_filename):
def GenerateDocs(channel, pepper_version, branch):
Trace('Generating docs for %s (branch %s)' % (channel, branch))
pepper_dirname = 'pepper_%s' % channel
- # i.e. ../_build/chromesite/pepper_beta
- chromesite_dir = os.path.join(DOC_DIR, '_build', 'chromesite', pepper_dirname)
+ # i.e. ../_developer.chrome.com_generated/pepper_beta
+ chromesite_dir = os.path.join(DOC_DIR, '_developer.chrome.com_generated',
+ pepper_dirname)
- CheckoutPepperDocs(branch, pepper_dirname)
- GenerateCHeaders(pepper_version, pepper_dirname)
+ try:
+ CheckoutPepperDocs(branch, pepper_dirname)
+ GenerateCHeaders(pepper_version, pepper_dirname)
- doxyfile_c = ''
- doxyfile_cpp = ''
+ doxyfile_c = ''
+ doxyfile_cpp = ''
- try:
# Generate Root index
rst_index_root = os.path.join(DOC_DIR, pepper_dirname, 'index.rst')
RunRstIndex('root', channel, pepper_version, chromesite_dir, rst_index_root)
@@ -207,6 +208,8 @@ def main(argv):
if options.verbose:
Trace.verbose = True
+ os.chdir(SCRIPT_DIR)
+
channel_info = GetChannelInfo()
for channel, info in channel_info.iteritems():
GenerateDocs(channel, info.version, info.branch)
diff --git a/native_client_sdk/src/doc/overview.rst b/native_client_sdk/src/doc/overview.rst
index d1c6e89..69f2fd9 100644
--- a/native_client_sdk/src/doc/overview.rst
+++ b/native_client_sdk/src/doc/overview.rst
@@ -22,7 +22,7 @@ the key benefits and common use cases of Native Client.
Google has implemented the open-source `Native Client project
<http://www.chromium.org/nativeclient>`_ in the Chrome browser on Windows, Mac,
Linux, and Chrome OS. The :doc:`Native Client Software Development Kit (SDK)
-<sdk/index>`, itself an open-source project, lets developers create web
+<sdk/download>`, itself an open-source project, lets developers create web
applications that use NaCl and run in Chrome across multiple platforms.
A web application that uses Native Client generally consists of a combination of
diff --git a/native_client_sdk/src/doc/quick-start.rst b/native_client_sdk/src/doc/quick-start.rst
index 987486b..548b928 100644
--- a/native_client_sdk/src/doc/quick-start.rst
+++ b/native_client_sdk/src/doc/quick-start.rst
@@ -18,7 +18,7 @@ To get started with Native Client:
of the examples. You can learn how to build and run the example applications
on the :doc:`Running the SDK Examples <sdk/examples>` page.
#. Browse through the :doc:`Developer's Guide <devguide/index>` and the
- :doc:`Pepper API <peppercpp/index>` reference documentation. The
+ :doc:`Pepper API <pepper_stable/index>` reference documentation. The
:doc:`Glossary <glossary>` defines some terms and names commonly used
throughout the documentation.