Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 1 | # Convenience Makefile for building HTML documentation. You probably |
| 2 | # need to set TEXINPUTS from the command line for this to be useful, |
| 3 | # unless you actually build the .dvi files in the top level directory. |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 4 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 5 | PAPER=letter |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 6 | TOPDIR=.. |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 7 | TOOLSDIR=$(TOPDIR)/tools |
| 8 | PAPERDIR=$(TOPDIR)/paper-$(PAPER) |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 9 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 10 | TEXINPUTS=$(TOPDIR)/paper-$(PAPER):$(TOPDIR)/texinputs: |
| 11 | |
| 12 | # Where are the various programs? |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 13 | PYTHON= python |
| 14 | WEBCHECKER=$(PYTHON) $(TOPDIR)/../Tools/webchecker/webchecker.py |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 15 | MKHOWTO= $(TOOLSDIR)/mkhowto --about $(TOPDIR)/html/stdabout.dat \ |
Fred Drake | 5dc6104 | 2000-09-12 19:53:18 +0000 | [diff] [blame] | 16 | --address $(PYTHONDOCS) --up-link ../index.html \ |
| 17 | --up-title "Python Documentation Index" |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 18 | MKHTML= $(MKHOWTO) --html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 19 | |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 20 | BUILDINDEX=$(TOOLSDIR)/buildindex.py |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 21 | |
Fred Drake | e435995 | 2000-10-25 16:12:04 +0000 | [diff] [blame] | 22 | PYTHONDOCS='See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.' |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 23 | HTMLBASE= file:`pwd` |
Fred Drake | 5761b76 | 1999-02-12 21:42:23 +0000 | [diff] [blame] | 24 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 25 | INDEXFILES=api/api.html \ |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 26 | doc/doc.html \ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 27 | ext/ext.html \ |
| 28 | lib/lib.html \ |
| 29 | mac/mac.html \ |
| 30 | ref/ref.html \ |
Greg Ward | 0784c33 | 2000-04-28 17:03:26 +0000 | [diff] [blame] | 31 | tut/tut.html \ |
| 32 | inst/inst.html \ |
| 33 | dist/dist.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 34 | |
| 35 | COMMONPERL= $(TOPDIR)/perl/manual.perl \ |
Fred Drake | 54c5205 | 1998-08-13 19:03:19 +0000 | [diff] [blame] | 36 | $(TOPDIR)/perl/python.perl \ |
| 37 | $(TOPDIR)/perl/l2hinit.perl |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 38 | |
| 39 | |
Fred Drake | 87d4a03 | 2000-10-09 18:56:23 +0000 | [diff] [blame] | 40 | all: $(INDEXFILES) index.html modindex.html acks.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 41 | |
Greg Ward | 0784c33 | 2000-04-28 17:03:26 +0000 | [diff] [blame] | 42 | .PHONY: api ext lib mac ref tut inst dist |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 43 | |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 44 | api: api/api.html |
Fred Drake | 766e0cb | 1999-04-05 19:28:29 +0000 | [diff] [blame] | 45 | doc: doc/doc.html |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 46 | ext: ext/ext.html |
| 47 | lib: lib/lib.html |
| 48 | mac: mac/mac.html |
| 49 | ref: ref/ref.html |
| 50 | tut: tut/tut.html |
Greg Ward | 0784c33 | 2000-04-28 17:03:26 +0000 | [diff] [blame] | 51 | inst: inst/inst.html |
| 52 | dist: dist/dist.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 53 | |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 54 | $(INDEXFILES): $(COMMONPERL) \ |
| 55 | $(TOPDIR)/html/about.dat \ |
| 56 | $(TOPDIR)/tools/node2label.pl |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 57 | |
Fred Drake | f407063 | 2000-08-11 17:36:21 +0000 | [diff] [blame] | 58 | include ../Makefile.deps |
| 59 | |
Fred Drake | 664c72f | 1999-04-29 17:04:21 +0000 | [diff] [blame] | 60 | # The index.html target is at the end since it screws up font-lock. |
| 61 | |
Fred Drake | 3705e59 | 2000-10-05 05:16:56 +0000 | [diff] [blame] | 62 | acks.html: ../ACKS $(TOOLSDIR)/support.py $(TOOLSDIR)/mkackshtml |
| 63 | $(TOOLSDIR)/mkackshtml --address $(PYTHONDOCS) --output acks.html \ |
| 64 | <../ACKS |
| 65 | |
| 66 | modindex.html: $(TOOLSDIR)/support.py $(TOOLSDIR)/mkmodindex |
| 67 | modindex.html: lib/lib.html mac/mac.html |
Fred Drake | 368b16a | 1999-03-02 15:56:19 +0000 | [diff] [blame] | 68 | $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ |
Fred Drake | b41f97d | 1999-03-04 21:25:05 +0000 | [diff] [blame] | 69 | --address $(PYTHONDOCS) \ |
Fred Drake | 684f78f | 1999-02-24 17:34:12 +0000 | [diff] [blame] | 70 | lib/modindex.html mac/modindex.html |
| 71 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 72 | api/api.html: $(APIFILES) $(BUILDINDEX) |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 73 | $(MKHTML) $(TOPDIR)/api/api.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 74 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 75 | doc/doc.html: $(DOCFILES) $(BUILDINDEX) |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 76 | $(MKHTML) $(TOPDIR)/doc/doc.tex |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 77 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 78 | ext/ext.html: $(EXTFILES) |
| 79 | echo $(EXTFILES) |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 80 | $(MKHTML) $(TOPDIR)/ext/ext.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 81 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 82 | lib/lib.html: $(LIBFILES) $(BUILDINDEX) |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 83 | $(MKHTML) $(TOPDIR)/lib/lib.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 84 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 85 | mac/mac.html: $(MACFILES) $(BUILDINDEX) |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 86 | $(MKHTML) $(TOPDIR)/mac/mac.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 87 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 88 | ref/ref.html: $(REFFILES) $(BUILDINDEX) |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 89 | $(MKHTML) $(TOPDIR)/ref/ref.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 90 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 91 | tut/tut.html: $(TUTFILES) $(TOOLSDIR)/mkhowto |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 92 | $(MKHTML) --numeric --split 3 $(TOPDIR)/tut/tut.tex |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 93 | |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 94 | inst/inst.html: $(INSTFILES) $(TOPDIR)/perl/distutils.perl |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 95 | $(MKHTML) $(TOPDIR)/inst/inst.tex |
Greg Ward | 0784c33 | 2000-04-28 17:03:26 +0000 | [diff] [blame] | 96 | |
| 97 | dist/dist.html:$(DISTFILES) $(TOPDIR)/perl/distutils.perl |
Fred Drake | 501b926 | 2000-08-31 07:00:17 +0000 | [diff] [blame] | 98 | $(MKHTML) $(TOPDIR)/dist/dist.tex |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 99 | |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 100 | webcheck: all |
| 101 | $(WEBCHECKER) $(HTMLBASE)/api/ |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 102 | $(WEBCHECKER) $(HTMLBASE)/doc/ |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 103 | $(WEBCHECKER) $(HTMLBASE)/ext/ |
| 104 | $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/ |
| 105 | $(WEBCHECKER) $(HTMLBASE)/mac/ |
| 106 | $(WEBCHECKER) $(HTMLBASE)/ref/ |
| 107 | $(WEBCHECKER) $(HTMLBASE)/tut/ |
Greg Ward | 0784c33 | 2000-04-28 17:03:26 +0000 | [diff] [blame] | 108 | $(WEBCHECKER) $(HTMLBASE)/dist/ |
| 109 | $(WEBCHECKER) $(HTMLBASE)/inst/ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 110 | |
| 111 | clean: |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 112 | rm -rf @webchecker.pickle |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 113 | |
Fred Drake | 532998e | 1999-09-24 13:51:19 +0000 | [diff] [blame] | 114 | distclean realclean clobber: clean |
Fred Drake | 3705e59 | 2000-10-05 05:16:56 +0000 | [diff] [blame] | 115 | rm -rf index.html modindex.html acks.html |
Greg Ward | 0784c33 | 2000-04-28 17:03:26 +0000 | [diff] [blame] | 116 | rm -rf api/ doc/ ext/ lib/ mac/ ref/ tut/ inst/ dist/ |
Fred Drake | 664c72f | 1999-04-29 17:04:21 +0000 | [diff] [blame] | 117 | |
| 118 | |
| 119 | # This is really ugly, but we're not dependent on $(RELEASE), which isn't |
| 120 | # defined here. It also maintains the proper dependency on boilerplate.tex. |
| 121 | |
| 122 | # It's at the end of the file since it wedges font-lock in XEmacs. |
| 123 | |
| 124 | BOILERPLATE=$(TOPDIR)/texinputs/boilerplate.tex |
Fred Drake | b9b4c5b | 2000-08-31 06:12:35 +0000 | [diff] [blame] | 125 | index.html: $(TOPDIR)/html/index.html.in $(BOILERPLATE) |
Fred Drake | 0d6bf0e | 1999-11-18 20:56:29 +0000 | [diff] [blame] | 126 | REL=`grep '\\release{' $(BOILERPLATE) | sed 's/.*\\release{\(.*\)}.*$$/\1/'`; \ |
| 127 | REL=`echo "$$REL" | sed 's/[$$]//g'`; \ |
Fred Drake | 664c72f | 1999-04-29 17:04:21 +0000 | [diff] [blame] | 128 | sed "s/@RELEASE@/$$REL/g" $< >TEMP |
| 129 | DATE=`grep '\\date{' $(BOILERPLATE) | sed 's/.*\\date{\(.*\)}.*$$/\1/'` ; \ |
Fred Drake | 0d6bf0e | 1999-11-18 20:56:29 +0000 | [diff] [blame] | 130 | if [ "$$DATE" = '\today' ] ; then DATE=`date '+%B %e, %Y'`;fi;\ |
Fred Drake | 664c72f | 1999-04-29 17:04:21 +0000 | [diff] [blame] | 131 | sed "s/@DATE@/$$DATE/g" TEMP >$@ |
| 132 | rm -f TEMP |