27 lines
923 B
Makefile
Raw Normal View History

2017-04-06 13:18:49 +08:00
# Minimal makefile for Sphinx documentation
2014-02-25 21:02:52 +08:00
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
2017-04-06 13:18:49 +08:00
SOURCEDIR = source
2014-02-25 21:02:52 +08:00
BUILDDIR = build
2017-04-06 13:18:49 +08:00
# Put it first so that "make" without argument is like "make help".
2014-02-25 21:02:52 +08:00
help:
2017-04-06 13:18:49 +08:00
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo " xelatexpdf to make LaTeX files and run them through xelatex"
2014-02-25 21:02:52 +08:00
2017-04-06 13:18:49 +08:00
.PHONY: help Makefile
2014-02-25 21:02:52 +08:00
2017-04-06 13:18:49 +08:00
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2014-02-25 21:02:52 +08:00
2017-04-06 13:21:42 +08:00
# make sphinx support chinese with xelatex
2017-04-06 13:18:49 +08:00
xelatexpdf: Makefile latex
2016-05-28 14:40:23 +08:00
@echo "Runnning LaTeX files through xelatex..."
cd $(BUILDDIR)/latex; latexmk -xelatex -shell-escape -interaction=nonstopmode
@echo "xelatex finished; the PDF files are in $(BUILDDIR)/latex."