X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3e029ed0f5c3774ac8e860cdcebf0619d924793f..a1cc22fad427a935d7747bd6dc2c6b901c8a799a:/doc/README.textile

diff --git a/doc/README.textile b/doc/README.textile
index 85757980a7..8427595545 100644
--- a/doc/README.textile
+++ b/doc/README.textile
@@ -12,17 +12,35 @@ Additional information is available on the "'Documentation' page on the Arvados
 
 h2. Install dependencies
 
+To build the core Arvados documentation:
+
 <pre>
 arvados/doc$ sudo apt-get install build-essential libcurl4-openssl-dev libgnutls28-dev libssl-dev
 arvados/doc$ bundle install
 </pre>
 
-To generate the Python SDK documentation, these additional dependencies are needed:
+SDK reference documentation has additional, optional build requirements.
+
+h3. Java SDK documentation
+
+<pre>
+$ sudo apt install gradle
+</pre>
+
+h3. Python SDK documentation
+
+<pre>
+arvados/doc$ sudo apt install python3-venv
+arvados/doc$ python3 -m venv .venv
+arvados/doc$ .venv/bin/pip install pdoc setuptools
+</pre>
+
+Then you must activate the virtualenv (e.g., run @. .venv/bin/activate@) before you run the @bundle exec rake@ commands below.
+
+h3. R SDK documentation
 
 <pre>
-arvados/doc$ sudo apt-get install python3-pip
-arvados/doc$ pip3 install arvados-python-client
-arvados/doc$ pip3 install pdoc3
+$ sudo apt install r-cran-devtools r-cran-roxygen2 r-cran-knitr r-cran-markdown r-cran-xml
 </pre>
 
 h2. Generate HTML pages
@@ -37,6 +55,18 @@ Alternately, to make the documentation browsable on the local filesystem:
 arvados/doc$ bundle exec rake generate baseurl=$PWD/.site
 </pre>
 
+h3. Selecting SDK documentation to build
+
+By default, the build process will try to detect what SDK documentation it can build, build all that, and skip the rest. You can specify exactly what you want to build using the @sdks@ environment variable. This is a list of comma- or space-separated SDKs you wanted to build documentation for. Valid values are @java@, @python@, @r@, @all@, or @none@. @all@ is a shortcut for listing all the valid SDKs. @none@ means do not build documentation for any SDK. For example, to build documentation for the Java and Python SDKs, but skip R:
+
+<pre>
+arvados/doc$ bundle exec rake generate baseurl=$PWD/.site sdks=java,python
+</pre>
+
+Specifying @sdks@ skips the build detection logic. If the Rakefile cannot build the requested SDK documentation, the build will fail.
+
+For backwards compatibility, if you do not specify @sdks@, but the @NO_SDK@ environment variable is set, or the @no-sdk@ file exists, the build will run as if you set @sdks=none@.
+
 h2. Run linkchecker
 
 If you have "Linkchecker":http://wummel.github.io/linkchecker/ installed on
@@ -69,12 +99,6 @@ You can set @baseurl@ (the URL prefix for all internal links), @arvados_cluster_
 arvados/doc$ bundle exec rake generate baseurl=/doc arvados_api_host=xyzzy.arvadosapi.com
 </pre>
 
-Make the docs appear at {workbench_host}/doc by creating a symbolic link in Workbench's @public@ directory, pointing to the generated HTML tree.
-
-<pre>
-arvados/doc$ ln -sn ../../../doc/.site ../apps/workbench/public/doc
-</pre>
-
 h2. Delete generated files
 
 <pre>
