add invalid parametrisation and self-intersections sections contributed by Michael...
[PyX.git] / manual / Makefile
blob89b8d13457be95a4e6aa60c68db2844a2eb39950
1 # Makefile for Sphinx documentation
4 PYTHON ?= python3
5 GS ?= gs
7 # You can set these variables from the command line.
8 SPHINXOPTS =
9 SPHINXBUILD = sphinx-build
10 PAPER =
11 BUILDDIR = _build
13 # Internal variables.
14 PAPEROPT_a4 = -D latex_paper_size=a4
15 PAPEROPT_letter = -D latex_paper_size=letter
16 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
18 .PHONY: help clean all html latexpdf figs
20 all: html latexpdf
21 @echo "Done."
23 clean:
24 -rm -rf $(BUILDDIR)/* *.pdf *.png
26 html: figs
27 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
28 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
30 latexpdf: figs
31 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
32 @echo "Running LaTeX files through pdflatex..."
33 make -C $(BUILDDIR)/latex all-pdf
34 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
36 figs: $(patsubst %.py, %.png, $(filter-out conf.py,$(wildcard *.py)))
38 %.pdf: %.py
39 export PYTHONPATH=$(CURDIR)/.. ; $(PYTHON) $^
41 %.png: %.pdf
42 $(GS) -r100 -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=$@ $^