Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 1 | # you could set this to a4 |
| 2 | PAPER=letter |
| 3 | |
| 4 | # Where are the various programs? |
| 5 | LATEX= latex |
| 6 | PDFLATEX= pdflatex |
| 7 | DVIPS= dvips -N0 -t $(PAPER) |
| 8 | MAKEINDEX= makeindex -s ../texinputs/myindex.ist |
| 9 | PYTHON= python |
| 10 | |
| 11 | TOOLSDIR= ../tools |
| 12 | TEXINPUTS= .:../texinputs: |
| 13 | |
| 14 | MKDVI= TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh |
| 15 | MKHOWTO= $(TOOLSDIR)/mkhowto.sh --keep |
| 16 | MKPDF= TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --pdf |
| 17 | |
| 18 | |
| 19 | # what's what |
| 20 | MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi |
| 21 | HOWTODVIFILES= mac.dvi |
| 22 | |
| 23 | MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf |
| 24 | HOWTOPDFFILES= mac.pdf |
| 25 | |
| 26 | MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps |
| 27 | HOWTOPSFILES= mac.ps |
| 28 | |
| 29 | DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) |
| 30 | PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES) |
| 31 | PSFILES= $(MANPSFILES) $(HOWTOPSFILES) |
| 32 | |
| 33 | |
| 34 | include ../Makefile.deps |
| 35 | |
| 36 | COMMONSTYLES= ../texinputs/python.sty \ |
| 37 | ../texinputs/pypaper.sty \ |
| 38 | ../texinputs/myindex.ist |
| 39 | |
| 40 | COMMONTEX= ../texinputs/copyright.tex \ |
| 41 | ../texinputs/boilerplate.tex |
| 42 | |
| 43 | MANSTYLES= ../texinputs/fncychap.sty \ |
| 44 | ../texinputs/manual.cls \ |
| 45 | $(COMMONSTYLES) |
| 46 | |
| 47 | HOWTOSTYLES= ../texinputs/howto.cls \ |
| 48 | $(COMMONSTYLES) |
| 49 | |
| 50 | |
| 51 | $(DVIFILES): ../tools/fix_hack ../tools/mkdvi.sh $(COMMONTEX) |
| 52 | $(PDFFILES): ../tools/fix_hack ../tools/mkdvi.sh $(COMMONTEX) |
| 53 | |
| 54 | $(MANDVIFILES): $(MANSTYLES) |
| 55 | $(MANPDFFILES): $(MANSTYLES) |
| 56 | |
| 57 | $(HOWTODVIFILES): ../tools/mkhowto.sh $(HOWTOSTYLES) |
| 58 | $(HOWTOPDFFILES): ../tools/mkhowto.sh $(HOWTOSTYLES) |
| 59 | |
| 60 | |
| 61 | # Rules to build PostScript and PDF formats |
| 62 | .SUFFIXES: .dvi .ps .pdf |
| 63 | |
| 64 | .dvi.ps: |
| 65 | $(DVIPS) -o $@ $< |
| 66 | |
| 67 | |
| 68 | all: ps |
| 69 | dvi: $(DVIFILES) |
| 70 | pdf: $(PDFFILES) |
| 71 | ps: $(PSFILES) |
| 72 | |
| 73 | |
Fred Drake | 7c86c59 | 1998-08-28 21:17:07 +0000 | [diff] [blame] | 74 | README: $(PSFILES) |
| 75 | $(TOOLSDIR)/getpagecounts >$@ |
| 76 | |
| 77 | |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 78 | # Python Library Reference |
| 79 | lib.dvi: $(TOOLSDIR)/indfix.py $(LIBFILES) |
| 80 | $(TOOLSDIR)/newind.py >$*.ind |
| 81 | $(TOOLSDIR)/newind.py modindex >mod$*.ind |
| 82 | TEXINPUTS=../lib:$(TEXINPUTS) $(LATEX) $* |
| 83 | $(MAKEINDEX) mod$*.idx |
| 84 | $(TOOLSDIR)/fix_hack $*.idx |
| 85 | $(MAKEINDEX) $*.idx |
| 86 | $(TOOLSDIR)/indfix.py $*.ind |
| 87 | TEXINPUTS=../lib:$(TEXINPUTS) $(LATEX) $* |
| 88 | |
| 89 | lib.pdf: $(TOOLSDIR)/indfix.py $(LIBFILES) |
| 90 | $(TOOLSDIR)/newind.py >$*.ind |
| 91 | $(TOOLSDIR)/newind.py modindex >mod$*.ind |
| 92 | TEXINPUTS=../lib:$(TEXINPUTS) $(PDFLATEX) $* |
| 93 | $(MAKEINDEX) mod$*.idx |
| 94 | $(TOOLSDIR)/fix_hack $*.idx |
| 95 | $(MAKEINDEX) $*.idx |
| 96 | $(TOOLSDIR)/indfix.py $*.ind |
| 97 | $(TOOLSDIR)/toc2bkm.py $* |
| 98 | TEXINPUTS=../lib:$(TEXINPUTS) $(PDFLATEX) $* |
| 99 | |
| 100 | # Python/C API Reference Manual |
| 101 | api.dvi: $(APIFILES) |
| 102 | $(MKDVI) api |
| 103 | |
| 104 | api.pdf: $(APIFILES) |
| 105 | $(MKPDF) api |
| 106 | |
| 107 | # Extending and Embedding the Python Interpreter |
| 108 | ext.dvi: $(EXTFILES) |
| 109 | $(MKDVI) ext |
| 110 | |
| 111 | ext.pdf: $(EXTFILES) |
| 112 | $(MKPDF) ext |
| 113 | |
| 114 | # Macintosh Library Modules |
| 115 | mac.dvi: $(MACFILES) |
| 116 | $(MKHOWTO) --dvi ../$*/$*.tex |
| 117 | |
| 118 | mac.pdf: $(MACFILES) |
| 119 | $(MKHOWTO) --pdf ../$*/$*.tex |
| 120 | |
| 121 | # Python Reference Manual |
| 122 | ref.dvi: $(REFFILES) |
| 123 | $(MKDVI) ref |
| 124 | |
| 125 | ref.pdf: $(REFFILES) |
| 126 | $(MKPDF) ref |
| 127 | |
| 128 | # Python Tutorial |
| 129 | tut.dvi: $(TUTFILES) |
| 130 | $(MKDVI) tut |
| 131 | |
| 132 | tut.pdf: $(TUTFILES) |
| 133 | $(MKPDF) tut |
| 134 | |
| 135 | |
| 136 | clean: |
| 137 | rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn |
| 138 | |
| 139 | clobber: clean |
| 140 | rm -f $(DVIFILES) $(PSFILES) $(PDFFILES) |
Fred Drake | f4cbb9c | 1998-09-23 17:37:14 +0000 | [diff] [blame^] | 141 | |
| 142 | realclean: clobber |
| 143 | distclean: clobber |