From 10b8b45b522df4e933694f7bbbce0a1cb872a464 Mon Sep 17 00:00:00 2001 From: "T.J. Yang" Date: Thu, 20 Nov 2014 15:24:02 -0600 Subject: [PATCH] makefile update at Thu Nov 20 15:24:02 CST 2014 --- doc/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 7559ab3da2..4b6d99e225 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -7,12 +7,18 @@ SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build SPHINXLANG = +XELATEX = xelatex # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif +# User-friendly check for xelatex +ifeq ($(shell which $(XELATEX) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(XELATEX)' command was not found.) +endif + # ----- Translations Support ------------------------------------------------> # If language is set, also set translation options ifeq ($(shell [ "x$(SPHINXLANG)" != "x" ] && echo 0 || echo 1), 0) @@ -142,7 +148,8 @@ latexpdfja: translations xetexpdf: translations $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through xelatex..." - cd $(BUILDDIR)/latex; xelatex *.tex && xelatex *.tex && xelatex *.tex; cd - + perl -pi -e 's!pdflatex!xelatex!' $(BUILDDIR)/latex/Makefile + $(MAKE) -C $(BUILDDIR)/latex -i @echo "xelatex finished; the PDF files are in $(BUILDDIR)/latex." text: translations @@ -207,7 +214,6 @@ pseudoxml: translations translations: - @if [ "$(SPHINXLANG)" = "en" ] || [ "x$(SPHINXLANG)" = "x" ]; then \ echo "No need to update translations. Skipping..."; \ elif [ ! -d locale/$(SPHINXLANG) ]; then \