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 |
Fred Drake | 50c507e | 1999-04-29 19:04:55 +0000 | [diff] [blame] | 18 | WCNEW=$(PYTHON) $(TOPDIR)/../Tools/webchecker/wcnew.py |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 19 | MKAUX= PAPER=$(PAPER) TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --aux |
| 20 | MKHTML= PAPER=$(PAPER) $(TOOLSDIR)/mkhtml.sh |
| 21 | KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 22 | |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 23 | BUILDINDEX=$(TOOLSDIR)/buildindex.py |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 24 | |
Fred Drake | 5761b76 | 1999-02-12 21:42:23 +0000 | [diff] [blame] | 25 | # 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] | 26 | L2HARGS= -html_version 4.0 |
| 27 | |
Fred Drake | 5bd608d | 1999-10-29 20:51:43 +0000 | [diff] [blame] | 28 | PYTHONDOCS='<hr>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] | 29 | HTMLBASE= file:`pwd` |
Fred Drake | 5761b76 | 1999-02-12 21:42:23 +0000 | [diff] [blame] | 30 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 31 | INDEXFILES=api/api.html \ |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 32 | doc/doc.html \ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 33 | ext/ext.html \ |
| 34 | lib/lib.html \ |
| 35 | mac/mac.html \ |
| 36 | ref/ref.html \ |
| 37 | tut/tut.html |
| 38 | |
| 39 | COMMONPERL= $(TOPDIR)/perl/manual.perl \ |
Fred Drake | 54c5205 | 1998-08-13 19:03:19 +0000 | [diff] [blame] | 40 | $(TOPDIR)/perl/python.perl \ |
| 41 | $(TOPDIR)/perl/l2hinit.perl |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 42 | |
| 43 | |
Fred Drake | 5cc0a9b | 1999-04-29 15:42:19 +0000 | [diff] [blame] | 44 | all: $(INDEXFILES) index.html modindex.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 45 | |
| 46 | .PHONY: api ext lib mac ref tut |
| 47 | |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 48 | api: api/api.html |
Fred Drake | 766e0cb | 1999-04-05 19:28:29 +0000 | [diff] [blame] | 49 | doc: doc/doc.html |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 50 | ext: ext/ext.html |
| 51 | lib: lib/lib.html |
| 52 | mac: mac/mac.html |
| 53 | ref: ref/ref.html |
| 54 | tut: tut/tut.html |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 55 | |
Fred Drake | a8ba364 | 1998-11-30 20:28:35 +0000 | [diff] [blame] | 56 | $(INDEXFILES): $(COMMONPERL) $(TOPDIR)/html/about.dat |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 57 | |
Fred Drake | 664c72f | 1999-04-29 17:04:21 +0000 | [diff] [blame] | 58 | # The index.html target is at the end since it screws up font-lock. |
| 59 | |
Fred Drake | 684f78f | 1999-02-24 17:34:12 +0000 | [diff] [blame] | 60 | modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex |
Fred Drake | 368b16a | 1999-03-02 15:56:19 +0000 | [diff] [blame] | 61 | $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \ |
Fred Drake | b41f97d | 1999-03-04 21:25:05 +0000 | [diff] [blame] | 62 | --address $(PYTHONDOCS) \ |
Fred Drake | 684f78f | 1999-02-24 17:34:12 +0000 | [diff] [blame] | 63 | lib/modindex.html mac/modindex.html |
| 64 | |
Fred Drake | dbf7d99 | 1999-04-29 18:29:38 +0000 | [diff] [blame] | 65 | api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 66 | $(MKHTML) api $(L2HARGS) |
| 67 | |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 68 | doc/doc.html: $(DOCFILES) $(BUILDINDEX) $(TOPDIR)/perl/ltxmarkup.perl |
Fred Drake | 8903be6 | 1999-09-23 16:54:06 +0000 | [diff] [blame] | 69 | $(TOOLSDIR)/mkhowto --about stdabout.dat --address $(PYTHONDOCS) \ |
| 70 | --html $(TOPDIR)/doc/doc.tex |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 71 | |
Fred Drake | dbf7d99 | 1999-04-29 18:29:38 +0000 | [diff] [blame] | 72 | ext/ext.html: $(PAPERDIR)/ext.aux $(TOOLSDIR)/mkhtml.sh |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 73 | $(MKHTML) ext $(L2HARGS) |
| 74 | |
Fred Drake | dbf7d99 | 1999-04-29 18:29:38 +0000 | [diff] [blame] | 75 | lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 76 | $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux |
| 77 | mv lib1.aux `$(KPSEWHICH) lib.aux` |
| 78 | $(MKHTML) lib $(L2HARGS) |
| 79 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 80 | mac/mac.html: $(MACFILES) $(BUILDINDEX) |
Fred Drake | 8903be6 | 1999-09-23 16:54:06 +0000 | [diff] [blame] | 81 | $(TOOLSDIR)/mkhowto --about stdabout.dat --address $(PYTHONDOCS) \ |
| 82 | --html $(TOPDIR)/mac/mac.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 83 | |
Fred Drake | dbf7d99 | 1999-04-29 18:29:38 +0000 | [diff] [blame] | 84 | ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX) $(TOOLSDIR)/mkhtml.sh |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 85 | $(MKHTML) ref $(L2HARGS) |
| 86 | |
Fred Drake | dbf7d99 | 1999-04-29 18:29:38 +0000 | [diff] [blame] | 87 | tut/tut.html: $(PAPERDIR)/tut.aux $(TOOLSDIR)/mkhtml.sh |
| 88 | $(MKHTML) --numeric tut $(L2HARGS) -split 3 |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 89 | |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 90 | |
Fred Drake | 2e23c31 | 1998-10-07 22:03:45 +0000 | [diff] [blame] | 91 | include ../Makefile.deps |
| 92 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 93 | $(PAPERDIR)/api.aux: $(APIFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 94 | (cd $(PAPERDIR); $(MKAUX) api) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 95 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 96 | $(PAPERDIR)/ext.aux: $(EXTFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 97 | (cd $(PAPERDIR); $(MKAUX) ext) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 98 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 99 | $(PAPERDIR)/lib.aux: $(LIBFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 100 | (cd $(PAPERDIR); $(MKAUX) lib) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 101 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 102 | $(PAPERDIR)/ref.aux: $(REFFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 103 | (cd $(PAPERDIR); $(MKAUX) ref) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 104 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 105 | $(PAPERDIR)/tut.aux: $(TUTFILES) |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 106 | (cd $(PAPERDIR); $(MKAUX) tut) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 107 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 108 | |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 109 | webcheck: all |
| 110 | $(WEBCHECKER) $(HTMLBASE)/api/ |
Fred Drake | 1468d77 | 1999-03-18 19:07:04 +0000 | [diff] [blame] | 111 | $(WEBCHECKER) $(HTMLBASE)/doc/ |
Fred Drake | 4d33e4e | 1999-02-15 19:29:08 +0000 | [diff] [blame] | 112 | $(WEBCHECKER) $(HTMLBASE)/ext/ |
| 113 | $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/ |
| 114 | $(WEBCHECKER) $(HTMLBASE)/mac/ |
| 115 | $(WEBCHECKER) $(HTMLBASE)/ref/ |
| 116 | $(WEBCHECKER) $(HTMLBASE)/tut/ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 117 | |
Fred Drake | 50c507e | 1999-04-29 19:04:55 +0000 | [diff] [blame] | 118 | wcnew: all |
| 119 | $(WCNEW) $(HTMLBASE)/api/ |
| 120 | $(WCNEW) $(HTMLBASE)/doc/ |
| 121 | $(WCNEW) $(HTMLBASE)/ext/ |
| 122 | $(WCNEW) -m290000 $(HTMLBASE)/lib/ |
| 123 | $(WCNEW) $(HTMLBASE)/mac/ |
| 124 | $(WCNEW) $(HTMLBASE)/ref/ |
| 125 | $(WCNEW) $(HTMLBASE)/tut/ |
| 126 | |
| 127 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 128 | clean: |
Fred Drake | 6f9dd5d | 1999-02-15 21:43:55 +0000 | [diff] [blame] | 129 | rm -rf @webchecker.pickle |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 130 | |
Fred Drake | 532998e | 1999-09-24 13:51:19 +0000 | [diff] [blame] | 131 | distclean realclean clobber: clean |
| 132 | rm -rf index.html modindex.html api/ doc/ ext/ lib/ mac/ ref/ tut/ |
Fred Drake | 664c72f | 1999-04-29 17:04:21 +0000 | [diff] [blame] | 133 | |
| 134 | |
| 135 | # This is really ugly, but we're not dependent on $(RELEASE), which isn't |
| 136 | # defined here. It also maintains the proper dependency on boilerplate.tex. |
| 137 | |
| 138 | # It's at the end of the file since it wedges font-lock in XEmacs. |
| 139 | |
| 140 | BOILERPLATE=$(TOPDIR)/texinputs/boilerplate.tex |
| 141 | index.html: index.html.in $(BOILERPLATE) |
| 142 | REL=`grep '\\release{' $(BOILERPLATE) | sed 's/.*\\release{\(.*\)}.*$$/\1/'` ; \ |
| 143 | sed "s/@RELEASE@/$$REL/g" $< >TEMP |
| 144 | DATE=`grep '\\date{' $(BOILERPLATE) | sed 's/.*\\date{\(.*\)}.*$$/\1/'` ; \ |
| 145 | sed "s/@DATE@/$$DATE/g" TEMP >$@ |
| 146 | rm -f TEMP |
| 147 | |