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