Statistics
| Branch: | Tag: | Revision:

root / docs / build / latex / Makefile @ 216bb34c

History | View | Annotate | Download (1.5 kB)

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
zip: all-$(FMT)
19
	mkdir $(ARCHIVEPREFIX)docs-$(FMT)
20
	cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
21
	zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
22
	rm -r $(ARCHIVEPREFIX)docs-$(FMT)
23

    
24
tar: all-$(FMT)
25
	mkdir $(ARCHIVEPREFIX)docs-$(FMT)
26
	cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
27
	tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
28
	rm -r $(ARCHIVEPREFIX)docs-$(FMT)
29

    
30
bz2: tar
31
	bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
32

    
33
# The number of LaTeX runs is quite conservative, but I don't expect it
34
# to get run often, so the little extra time won't hurt.
35
%.dvi: %.tex
36
	latex $(LATEXOPTS) '$<'
37
	latex $(LATEXOPTS) '$<'
38
	latex $(LATEXOPTS) '$<'
39
	-makeindex -s python.ist '$(basename $<).idx'
40
	-makeindex -s python.ist '$(basename mod$<).idx'
41
	latex $(LATEXOPTS) '$<'
42
	latex $(LATEXOPTS) '$<'
43

    
44
%.pdf: %.tex
45
	pdflatex $(LATEXOPTS) '$<'
46
	pdflatex $(LATEXOPTS) '$<'
47
	pdflatex $(LATEXOPTS) '$<'
48
	-makeindex -s python.ist '$(basename $<).idx'
49
	-makeindex -s python.ist '$(basename mod$<).idx'
50
	pdflatex $(LATEXOPTS) '$<'
51
	pdflatex $(LATEXOPTS) '$<'
52

    
53
clean:
54
	rm -f *.pdf *.dvi *.ps
55
	rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla
56

    
57
.PHONY: all all-pdf all-dvi all-ps clean
58