Fred Drake | 60515f4 | 1998-05-07 14:50:22 +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 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 8 | PAPER=letter |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 9 | TOPDIR=.. |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 10 | TOOLSDIR=$(TOPDIR)/tools |
| 11 | PAPERDIR=$(TOPDIR)/paper-$(PAPER) |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 12 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 13 | TEXINPUTS=$(TOPDIR)/paper-$(PAPER):$(TOPDIR)/texinputs: |
| 14 | |
| 15 | # Where are the various programs? |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 16 | PYTHON= python |
| 17 | WEBCHECKER=$(PYTHON) $(TOPDIR)/../Tools/webchecker/webchecker.py |
| 18 | MKAUX= PAPER=$(PAPER) TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --aux |
| 19 | MKHTML= PAPER=$(PAPER) $(TOOLSDIR)/mkhtml.sh |
| 20 | KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 21 | |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 22 | BUILDINDEX=$(TOOLSDIR)/buildindex.py |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 23 | |
Fred Drake | 5761b76 | 1999-02-12 21:42:23 +0000 | [diff] [blame] | 24 | # make it clear to l2h, since our support only generates HTML 4.0 |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 25 | L2HARGS= -html_version 4.0 |
| 26 | |
Fred Drake | 4050e00 | 1999-04-28 15:06:08 +0000 | [diff] [blame] | 27 | PYTHONDOCS='<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.' |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 28 | HTMLBASE= file:`pwd` |
Fred Drake | 5761b76 | 1999-02-12 21:42:23 +0000 | [diff] [blame] | 29 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 30 | INDEXFILES=api/api.html \ |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 31 | doc/doc.html \ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 32 | ext/ext.html \ |
| 33 | lib/lib.html \ |
| 34 | mac/mac.html \ |
| 35 | ref/ref.html \ |
| 36 | tut/tut.html |
| 37 | |
| 38 | COMMONPERL= $(TOPDIR)/perl/manual.perl \ |
Fred Drake | 54c5205 | 1998-08-13 19:03:19 +0000 | [diff] [blame] | 39 | $(TOPDIR)/perl/python.perl \ |
| 40 | $(TOPDIR)/perl/l2hinit.perl |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 41 | |
| 42 | |
Fred Drake | 5cc0a9b | 1999-04-29 15:42:19 +0000 | [diff] [blame^] | 43 | all: $(INDEXFILES) index.html modindex.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 44 | |
| 45 | .PHONY: api ext lib mac ref tut |
| 46 | |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 47 | api: api/api.html |
Fred Drake | 766e0cb | 1999-04-05 19:28:29 +0000 | [diff] [blame] | 48 | doc: doc/doc.html |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 49 | ext: ext/ext.html |
| 50 | lib: lib/lib.html |
| 51 | mac: mac/mac.html |
| 52 | ref: ref/ref.html |
| 53 | tut: tut/tut.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 54 | |
Fred Drake | a8ba364 | 1998-11-30 20:28:35 +0000 | [diff] [blame] | 55 | $(INDEXFILES): $(COMMONPERL) $(TOPDIR)/html/about.dat |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 56 | |
Fred Drake | 684f78f | 1999-02-24 17:34:12 +0000 | [diff] [blame] | 57 | modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex |
Fred Drake | 368b16a | 1999-03-02 15:56:19 +0000 | [diff] [blame] | 58 | $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ |
Fred Drake | b41f97d | 1999-03-04 21:25:05 +0000 | [diff] [blame] | 59 | --address $(PYTHONDOCS) \ |
Fred Drake | 684f78f | 1999-02-24 17:34:12 +0000 | [diff] [blame] | 60 | lib/modindex.html mac/modindex.html |
| 61 | |
Fred Drake | 5cc0a9b | 1999-04-29 15:42:19 +0000 | [diff] [blame^] | 62 | # This is really ugly, but we're not dependent on $(RELEASE), which isn't |
| 63 | # defined here. It also maintains the proper dependency on boilerplate.tex. |
| 64 | |
| 65 | BOILERPLATE=$(TOPDIR)/texinputs/boilerplate.tex |
| 66 | index.html: index.html.in $(BOILERPLATE) |
| 67 | REL=`grep '\\release{' $(BOILERPLATE) | sed 's/.*\\release{\(.*\)}.*$$/\1/'` ; \ |
| 68 | sed "s/@RELEASE@/$$REL/g" $< >TEMP |
| 69 | DATE=`grep '\\date{' $(BOILERPLATE) | sed 's/.*\\date{\(.*\)}.*$$/\1/'` ; \ |
| 70 | sed "s/@DATE@/$$DATE/g" TEMP >$@ |
| 71 | rm -f TEMP |
| 72 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 73 | api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX) |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 74 | $(MKHTML) api $(L2HARGS) |
| 75 | |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 76 | doc/doc.html: $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl |
| 77 | $(TOOLSDIR)/mkhowto --address $(PYTHONDOCS) --html \ |
| 78 | $(TOPDIR)/doc/doc.tex |
| 79 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 80 | ext/ext.html: $(PAPERDIR)/ext.aux |
| 81 | $(MKHTML) ext $(L2HARGS) |
| 82 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 83 | lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX) |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 84 | $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux |
| 85 | mv lib1.aux `$(KPSEWHICH) lib.aux` |
| 86 | $(MKHTML) lib $(L2HARGS) |
| 87 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 88 | mac/mac.html: $(MACFILES) $(BUILDINDEX) |
Fred Drake | b41f97d | 1999-03-04 21:25:05 +0000 | [diff] [blame] | 89 | $(TOOLSDIR)/mkhowto --address $(PYTHONDOCS) --html \ |
| 90 | $(TOPDIR)/mac/mac.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 91 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 92 | ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX) |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 93 | $(MKHTML) ref $(L2HARGS) |
| 94 | |
| 95 | tut/tut.html: $(PAPERDIR)/tut.aux |
| 96 | $(MKHTML) tut $(L2HARGS) |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 97 | |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 98 | |
Fred Drake | 2e23c31 | 1998-10-07 22:03:45 +0000 | [diff] [blame] | 99 | include ../Makefile.deps |
| 100 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 101 | $(PAPERDIR)/api.aux: $(APIFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 102 | (cd $(PAPERDIR); $(MKAUX) api) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 103 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 104 | $(PAPERDIR)/ext.aux: $(EXTFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 105 | (cd $(PAPERDIR); $(MKAUX) ext) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 106 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 107 | $(PAPERDIR)/lib.aux: $(LIBFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 108 | (cd $(PAPERDIR); $(MKAUX) lib) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 109 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 110 | $(PAPERDIR)/ref.aux: $(REFFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 111 | (cd $(PAPERDIR); $(MKAUX) ref) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 112 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 113 | $(PAPERDIR)/tut.aux: $(TUTFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 114 | (cd $(PAPERDIR); $(MKAUX) tut) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 115 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 116 | |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 117 | webcheck: all |
| 118 | $(WEBCHECKER) $(HTMLBASE)/api/ |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 119 | $(WEBCHECKER) $(HTMLBASE)/doc/ |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 120 | $(WEBCHECKER) $(HTMLBASE)/ext/ |
| 121 | $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/ |
| 122 | $(WEBCHECKER) $(HTMLBASE)/mac/ |
| 123 | $(WEBCHECKER) $(HTMLBASE)/ref/ |
| 124 | $(WEBCHECKER) $(HTMLBASE)/tut/ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 125 | |
| 126 | clean: |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 127 | rm -rf @webchecker.pickle |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 128 | |
| 129 | clobber: clean |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 130 | rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ |