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