docs/_build/latex/Makefile

changeset 11
79fea4145278
equal deleted inserted replaced
10:f6927689a3b2 11:79fea4145278
1 # Makefile for Sphinx LaTeX output
2
3 ALLDOCS = $(basename $(wildcard *.tex))
4 ALLPDF = $(addsuffix .pdf,$(ALLDOCS))
5 ALLDVI = $(addsuffix .dvi,$(ALLDOCS))
6
7 # Prefix for archive names
8 ARCHIVEPRREFIX =
9 # Additional LaTeX options
10 LATEXOPTS =
11
12 all: $(ALLPDF)
13 all-pdf: $(ALLPDF)
14 all-dvi: $(ALLDVI)
15 all-ps: all-dvi
16 for f in *.dvi; do dvips $$f; done
17
18 all-pdf-ja:
19 for f in *.pdf *.png *.gif *.jpg *.jpeg; do ebb $$f; done
20 for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
21 for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
22 for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
23 for f in *.idx; do mendex -U -f -d "`basename $$f .idx`.dic" -s python.ist $$f; done
24 for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
25 for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
26 for f in *.dvi; do dvipdfmx $$f; done
27
28 zip: all-$(FMT)
29 mkdir $(ARCHIVEPREFIX)docs-$(FMT)
30 cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
31 zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
32 rm -r $(ARCHIVEPREFIX)docs-$(FMT)
33
34 tar: all-$(FMT)
35 mkdir $(ARCHIVEPREFIX)docs-$(FMT)
36 cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
37 tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
38 rm -r $(ARCHIVEPREFIX)docs-$(FMT)
39
40 bz2: tar
41 bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
42
43 # The number of LaTeX runs is quite conservative, but I don't expect it
44 # to get run often, so the little extra time won't hurt.
45 %.dvi: %.tex
46 latex $(LATEXOPTS) '$<'
47 latex $(LATEXOPTS) '$<'
48 latex $(LATEXOPTS) '$<'
49 -makeindex -s python.ist '$(basename $<).idx'
50 latex $(LATEXOPTS) '$<'
51 latex $(LATEXOPTS) '$<'
52
53 %.pdf: %.tex
54 pdflatex $(LATEXOPTS) '$<'
55 pdflatex $(LATEXOPTS) '$<'
56 pdflatex $(LATEXOPTS) '$<'
57 -makeindex -s python.ist '$(basename $<).idx'
58 pdflatex $(LATEXOPTS) '$<'
59 pdflatex $(LATEXOPTS) '$<'
60
61 clean:
62 rm -f *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla
63
64 .PHONY: all all-pdf all-dvi all-ps clean
65 .PHONY: all-pdf-ja
66

mercurial