Fred Drake | e018bee | 2000-03-31 20:22:29 +0000 | [diff] [blame] | 1 | # Convenience Makefile for building HTML documentation. You probably need to |
| 2 | # set TEXINPUTS from the command line for this to be useful, unless you |
| 3 | # actually build the .dvi files in the top level directory. |
| 4 | # |
| 5 | # Note that the .dvi files must already be built and TEXINPUTS must include the |
| 6 | # directory where latex's working files (esp. *.aux) are kept. |
| 7 | |
| 8 | PAPER=letter |
| 9 | TOPDIR=.. |
| 10 | TOOLSDIR=$(TOPDIR)/tools |
| 11 | PAPERDIR=$(TOPDIR)/paper-$(PAPER) |
| 12 | |
| 13 | TEXINPUTS=$(TOPDIR)/paper-$(PAPER):$(TOPDIR)/texinputs: |
| 14 | |
| 15 | # Where are the various programs? |
| 16 | PYTHON= python |
| 17 | MKAUX= PAPER=$(PAPER) TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --aux |
| 18 | MKHTML= PAPER=$(PAPER) $(TOOLSDIR)/mkhtml.sh --numeric |
| 19 | KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex |
| 20 | |
| 21 | BUILDINDEX=$(TOOLSDIR)/buildindex.py |
| 22 | |
| 23 | # make it clear to l2h, since our support only generates HTML 4.0 |
| 24 | L2HARGS= -html_version 4.0 |
| 25 | |
| 26 | PYTHONDOCS='<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.' |
| 27 | HTMLBASE= file:`pwd` |
| 28 | |
| 29 | INDEXFILES=api/api.html \ |
| 30 | doc/doc.html \ |
| 31 | ext/ext.html \ |
| 32 | lib/lib.html \ |
| 33 | mac/mac.html \ |
| 34 | ref/ref.html \ |
| 35 | tut/tut.html |
| 36 | |
| 37 | COMMONPERL= $(TOPDIR)/perl/manual.perl \ |
| 38 | $(TOPDIR)/perl/python.perl \ |
| 39 | $(TOPDIR)/perl/l2hinit.perl |
| 40 | |
| 41 | |
Fred Drake | 9c26f5d | 2000-03-31 20:26:33 +0000 | [diff] [blame] | 42 | all: $(INDEXFILES) icons |
Fred Drake | e018bee | 2000-03-31 20:22:29 +0000 | [diff] [blame] | 43 | |
| 44 | .PHONY: api ext lib mac ref tut |
| 45 | |
| 46 | api: api/api.html |
| 47 | doc: doc/doc.html |
| 48 | ext: ext/ext.html |
| 49 | lib: lib/lib.html |
| 50 | mac: mac/mac.html |
| 51 | ref: ref/ref.html |
| 52 | tut: tut/tut.html |
| 53 | |
| 54 | $(INDEXFILES): $(COMMONPERL) \ |
| 55 | $(TOPDIR)/html/about.dat |
| 56 | |
Fred Drake | 9c26f5d | 2000-03-31 20:26:33 +0000 | [diff] [blame] | 57 | icons: ../html/icons |
| 58 | if [ ! -d icons ] ; then mkdir icons; fi |
| 59 | cp ../html/icons/*.* icons/ |
| 60 | |
Fred Drake | e018bee | 2000-03-31 20:22:29 +0000 | [diff] [blame] | 61 | api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh |
| 62 | $(MKHTML) api $(L2HARGS) -split 3 |
| 63 | |
| 64 | doc/doc.html: $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl |
| 65 | $(TOOLSDIR)/mkhowto --numeric --split=3 --address $(PYTHONDOCS) \ |
| 66 | --html $(TOPDIR)/doc/doc.tex |
| 67 | |
| 68 | ext/ext.html: $(PAPERDIR)/ext.aux $(TOOLSDIR)/mkhtml.sh |
| 69 | $(MKHTML) ext $(L2HARGS) -split 3 |
| 70 | |
| 71 | lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh |
| 72 | $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux |
| 73 | mv lib1.aux `$(KPSEWHICH) lib.aux` |
| 74 | $(MKHTML) lib $(L2HARGS) -split 3 |
| 75 | |
| 76 | mac/mac.html: $(MACFILES) $(BUILDINDEX) |
| 77 | $(TOOLSDIR)/mkhowto --numeric --split=3 --address $(PYTHONDOCS) \ |
| 78 | --html $(TOPDIR)/mac/mac.tex |
| 79 | |
| 80 | ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh |
| 81 | $(MKHTML) ref $(L2HARGS) -split 3 |
| 82 | |
| 83 | tut/tut.html: $(PAPERDIR)/tut.aux $(TOOLSDIR)/mkhtml.sh |
| 84 | $(MKHTML) tut $(L2HARGS) -split 3 |
| 85 | |
| 86 | |
| 87 | include ../Makefile.deps |
| 88 | |
| 89 | $(PAPERDIR)/api.aux: $(APIFILES) |
| 90 | (cd $(PAPERDIR); $(MKAUX) api) |
| 91 | |
| 92 | $(PAPERDIR)/ext.aux: $(EXTFILES) |
| 93 | (cd $(PAPERDIR); $(MKAUX) ext) |
| 94 | |
| 95 | $(PAPERDIR)/lib.aux: $(LIBFILES) |
| 96 | (cd $(PAPERDIR); $(MKAUX) lib) |
| 97 | |
| 98 | $(PAPERDIR)/ref.aux: $(REFFILES) |
| 99 | (cd $(PAPERDIR); $(MKAUX) ref) |
| 100 | |
| 101 | $(PAPERDIR)/tut.aux: $(TUTFILES) |
| 102 | (cd $(PAPERDIR); $(MKAUX) tut) |
| 103 | |
| 104 | |
| 105 | clean: |
| 106 | : |
| 107 | |
| 108 | clobber: |
| 109 | rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ |