makefile update at Thu Nov 20 15:24:02 CST 2014

This commit is contained in:
T.J. Yang 2014-11-20 15:24:02 -06:00
parent 7f9f9c7e81
commit 10b8b45b52

View File

@ -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 \