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) |
Fred Drake | fbdddde | 1998-10-19 21:48:05 +0000 | [diff] [blame] | 8 | MAKEINDEX= makeindex -s ../texinputs/python.ist |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 9 | PYTHON= python |
| 10 | |
| 11 | TOOLSDIR= ../tools |
| 12 | TEXINPUTS= .:../texinputs: |
| 13 | |
| 14 | MKDVI= TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh |
Fred Drake | 1508743 | 1999-03-16 16:11:27 +0000 | [diff] [blame] | 15 | # The --keep option is needed to keep the intermediate files for generating |
| 16 | # the HTML global module index. |
Fred Drake | 6b12b1e | 1999-03-03 20:27:10 +0000 | [diff] [blame] | 17 | MKHOWTO= $(TOOLSDIR)/mkhowto --keep |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 18 | MKPDF= TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --pdf |
| 19 | |
| 20 | |
| 21 | # what's what |
| 22 | MANDVIFILES= api.dvi ext.dvi lib.dvi ref.dvi tut.dvi |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 23 | HOWTODVIFILES= doc.dvi mac.dvi inst.dvi dist.dvi |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 24 | |
| 25 | MANPDFFILES= api.pdf ext.pdf lib.pdf ref.pdf tut.pdf |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 26 | HOWTOPDFFILES= doc.pdf mac.pdf inst.pdf dist.pdf |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 27 | |
| 28 | MANPSFILES= api.ps ext.ps lib.ps ref.ps tut.ps |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 29 | HOWTOPSFILES= doc.ps mac.ps inst.ps dist.ps |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 30 | |
| 31 | DVIFILES= $(MANDVIFILES) $(HOWTODVIFILES) |
| 32 | PDFFILES= $(MANPDFFILES) $(HOWTOPDFFILES) |
| 33 | PSFILES= $(MANPSFILES) $(HOWTOPSFILES) |
| 34 | |
| 35 | |
| 36 | include ../Makefile.deps |
| 37 | |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 38 | |
Fred Drake | 6ab9832 | 1999-04-14 14:04:39 +0000 | [diff] [blame] | 39 | SCRIPTS: ../tools/fix_hack ../tools/mkdvi.sh ../tools/indfix.py |
| 40 | |
Fred Drake | c6d45af | 1999-10-29 20:49:23 +0000 | [diff] [blame] | 41 | $(DVIFILES): $(SCRIPTS) |
| 42 | $(PDFFILES): $(SCRIPTS) |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 43 | |
Fred Drake | c6d45af | 1999-10-29 20:49:23 +0000 | [diff] [blame] | 44 | $(HOWTODVIFILES): ../tools/mkhowto |
| 45 | $(HOWTOPDFFILES): ../tools/mkhowto |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 46 | |
| 47 | |
| 48 | # Rules to build PostScript and PDF formats |
| 49 | .SUFFIXES: .dvi .ps .pdf |
| 50 | |
| 51 | .dvi.ps: |
| 52 | $(DVIPS) -o $@ $< |
| 53 | |
| 54 | |
| 55 | all: ps |
| 56 | dvi: $(DVIFILES) |
| 57 | pdf: $(PDFFILES) |
| 58 | ps: $(PSFILES) |
| 59 | |
| 60 | |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 61 | README: $(PSFILES) $(TOOLSDIR)/getpagecounts |
Fred Drake | 7c86c59 | 1998-08-28 21:17:07 +0000 | [diff] [blame] | 62 | $(TOOLSDIR)/getpagecounts >$@ |
| 63 | |
| 64 | |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 65 | # Python/C API Reference Manual |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 66 | api.dvi: api.tex $(APIFILES) |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 67 | $(MKDVI) api |
| 68 | |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 69 | api.pdf: api.tex $(APIFILES) |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 70 | $(MKPDF) api |
| 71 | |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 72 | api.tex: ../api/api.tex ../api/refcounts.dat ../tools/anno-api.py |
| 73 | $(PYTHON) ../tools/anno-api.py -o $@ ../api/api.tex |
| 74 | |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 75 | # Distributing Python Modules |
| 76 | dist.dvi: $(DISTFILES) |
| 77 | $(MKHOWTO) --dvi ../dist/dist.tex |
| 78 | |
| 79 | dist.pdf: $(DISTFILES) |
| 80 | $(MKHOWTO) --pdf ../dist/dist.tex |
| 81 | |
Fred Drake | 1508743 | 1999-03-16 16:11:27 +0000 | [diff] [blame] | 82 | # Documenting Python |
Fred Drake | c6d45af | 1999-10-29 20:49:23 +0000 | [diff] [blame] | 83 | doc.dvi: $(DOCFILES) |
Fred Drake | 1508743 | 1999-03-16 16:11:27 +0000 | [diff] [blame] | 84 | $(MKHOWTO) --dvi ../doc/doc.tex |
| 85 | |
Fred Drake | c6d45af | 1999-10-29 20:49:23 +0000 | [diff] [blame] | 86 | doc.pdf: $(DOCFILES) |
Fred Drake | 1508743 | 1999-03-16 16:11:27 +0000 | [diff] [blame] | 87 | $(MKHOWTO) --pdf ../doc/doc.tex |
| 88 | |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 89 | # Extending and Embedding the Python Interpreter |
| 90 | ext.dvi: $(EXTFILES) |
| 91 | $(MKDVI) ext |
| 92 | |
| 93 | ext.pdf: $(EXTFILES) |
| 94 | $(MKPDF) ext |
| 95 | |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 96 | # Installing Python Modules |
| 97 | inst.dvi: $(INSTFILES) |
| 98 | $(MKHOWTO) --dvi ../inst/inst.tex |
| 99 | |
| 100 | inst.pdf: $(INSTFILES) |
| 101 | $(MKHOWTO) --pdf ../inst/inst.tex |
| 102 | |
Fred Drake | 6ab9832 | 1999-04-14 14:04:39 +0000 | [diff] [blame] | 103 | # Python Library Reference |
| 104 | lib.dvi: $(LIBFILES) |
| 105 | $(MKDVI) lib |
| 106 | |
| 107 | lib.pdf: $(LIBFILES) |
| 108 | $(MKPDF) lib |
| 109 | |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 110 | # Macintosh Library Modules |
| 111 | mac.dvi: $(MACFILES) |
Fred Drake | d82af0b | 1998-12-28 15:17:22 +0000 | [diff] [blame] | 112 | $(MKHOWTO) --dvi ../mac/mac.tex |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 113 | |
| 114 | mac.pdf: $(MACFILES) |
Fred Drake | d82af0b | 1998-12-28 15:17:22 +0000 | [diff] [blame] | 115 | $(MKHOWTO) --pdf ../mac/mac.tex |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 116 | |
| 117 | # Python Reference Manual |
| 118 | ref.dvi: $(REFFILES) |
| 119 | $(MKDVI) ref |
| 120 | |
| 121 | ref.pdf: $(REFFILES) |
| 122 | $(MKPDF) ref |
| 123 | |
| 124 | # Python Tutorial |
| 125 | tut.dvi: $(TUTFILES) |
| 126 | $(MKDVI) tut |
| 127 | |
| 128 | tut.pdf: $(TUTFILES) |
| 129 | $(MKPDF) tut |
| 130 | |
| 131 | |
| 132 | clean: |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 133 | rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn *.pla api.tex |
Fred Drake | d48d62c | 1998-08-12 17:00:24 +0000 | [diff] [blame] | 134 | |
| 135 | clobber: clean |
| 136 | rm -f $(DVIFILES) $(PSFILES) $(PDFFILES) |
Fred Drake | f4cbb9c | 1998-09-23 17:37:14 +0000 | [diff] [blame] | 137 | |
| 138 | realclean: clobber |
| 139 | distclean: clobber |