This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/8.0.x by this push:
new a24582b Doc: Fix doc build to work with Sphinx 1.8.
a24582b is described below
commit a24582b8d599e5a0b90d0abe789b192a3f3eaec0
Author: Alan M. Carroll <[email protected]>
AuthorDate: Mon Oct 8 18:23:28 2018 -0500
Doc: Fix doc build to work with Sphinx 1.8.
(cherry picked from commit 1d0cf7316594e6ad7eb756a558312f16ac820a7a)
Conflicts:
doc/ext/local-config.py.in
---
doc/Makefile.am | 2 +-
doc/ext/local-config.py.in | 13 +++++++++++--
doc/{ => ext}/plantuml_fetch.sh | 0
doc/ext/traffic-server.py | 8 ++++++++
doc/uml/Makefile.am | 2 +-
5 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 97553ed..f03bb87 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -61,7 +61,7 @@ I18NSPHINXOPTS = $(SPHINXOPTS)
# The PAPER setting variables requires recursive make variable expansion,
which automake
# detects as non-portable. We bounce this through a shell script and do the
expansion there.
SBUILD = PAPEROPT_a4="$(PAPEROPT_a4)" PAPEROPT_letter="$(PAPEROPT_letter)"
PAPER="$(PAPER)" \
- PLANTUML_JAR="$(shell ./plantuml_fetch.sh | tail -1)" \
+ PLANTUML_JAR="$(shell ext/plantuml_fetch.sh | tail -1)" \
$(srcdir)/sbuild $(SPHINXBUILD) \
-c $(srcdir) \
$(ALLSPHINXOPTS)
diff --git a/doc/ext/local-config.py.in b/doc/ext/local-config.py.in
index cefb5df..b726e36 100644
--- a/doc/ext/local-config.py.in
+++ b/doc/ext/local-config.py.in
@@ -14,5 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-plantuml='@JAVA@ -jar {}'.format(os.environ['PLANTUML_JAR'])
-plantuml_output_format='svg'
+import os
+import subprocess
+
+if "PLANTUML_JAR" in os.environ:
+ _plantuml_jar = os.environ["PLANTUML_JAR"]
+else:
+ _plantuml_jar = subprocess.check_output("@abs_srcdir@/plantuml_fetch.sh|
tail -1",
+ shell=True,
universal_newlines=True)
+
+plantuml = '@JAVA@ -jar {}'.format(_plantuml_jar.rstrip('\n'))
+plantuml_output_format = 'svg'
diff --git a/doc/plantuml_fetch.sh b/doc/ext/plantuml_fetch.sh
similarity index 100%
rename from doc/plantuml_fetch.sh
rename to doc/ext/plantuml_fetch.sh
diff --git a/doc/ext/traffic-server.py b/doc/ext/traffic-server.py
index 6e88d31..062af33 100644
--- a/doc/ext/traffic-server.py
+++ b/doc/ext/traffic-server.py
@@ -409,6 +409,14 @@ def setup(app):
app.add_crossref_type('configfile', 'file',
objname='Configuration file',
indextemplate='pair: %s; Configuration files')
+
+ # Very ugly, but as of Sphinx 1.8 it must be done. There is an `override`
option to add_crossref_type
+ # but it only applies to the directive, not the role (`file` in this
case). If this isn't cleared
+ # explicitly the build will fail out due to the conflict. In this case,
since the role action is the
+ # same in all cases, the output is correct. This does assume the config
file names and log files
+ # names are disjoint sets.
+ del app.registry.domain_roles['std']['file']
+
app.add_crossref_type('logfile', 'file',
objname='Log file',
indextemplate='pair: %s; Log files')
diff --git a/doc/uml/Makefile.am b/doc/uml/Makefile.am
index 70f3c6d..956068f 100644
--- a/doc/uml/Makefile.am
+++ b/doc/uml/Makefile.am
@@ -18,7 +18,7 @@
if BUILD_DOCS
images := $(patsubst %.uml,images/%.svg,$(wildcard *.uml))
-PLANTUML_JAR := $(shell ../plantuml_fetch.sh | tail -1)
+PLANTUML_JAR := $(shell ../ext/plantuml_fetch.sh | tail -1)
all-am: jar-check $(images)
endif