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? |
| 16 | PYTHON= python |
| 17 | WEBCHECKER= $(PYTHON) $(TOPDIR)/../Tools/webchecker/webchecker.py |
| 18 | MKHTML= PAPER=$(PAPER) $(TOOLSDIR)/mkhtml.sh |
| 19 | KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex |
| 20 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 21 | BUILDINDEX= $(TOOLSDIR)/buildindex.py |
| 22 | |
Fred Drake | 5761b76 | 1999-02-12 21:42:23 +0000 | [diff] [blame^] | 23 | # make it clear to l2h, since our support only generates HTML 4.0 |
| 24 | L2HARGS= -html_version 4.0 |
| 25 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 26 | INDEXFILES=api/api.html \ |
| 27 | ext/ext.html \ |
| 28 | lib/lib.html \ |
| 29 | mac/mac.html \ |
| 30 | ref/ref.html \ |
| 31 | tut/tut.html |
| 32 | |
| 33 | COMMONPERL= $(TOPDIR)/perl/manual.perl \ |
Fred Drake | 54c5205 | 1998-08-13 19:03:19 +0000 | [diff] [blame] | 34 | $(TOPDIR)/perl/python.perl \ |
| 35 | $(TOPDIR)/perl/l2hinit.perl |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 36 | |
| 37 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 38 | all: icons $(INDEXFILES) |
| 39 | |
| 40 | .PHONY: api ext lib mac ref tut |
| 41 | |
| 42 | api: icons api/api.html |
| 43 | ext: icons ext/ext.html |
| 44 | lib: icons lib/lib.html |
| 45 | mac: icons mac/mac.html |
| 46 | ref: icons ref/ref.html |
| 47 | tut: icons tut/tut.html |
| 48 | |
Fred Drake | a8ba364 | 1998-11-30 20:28:35 +0000 | [diff] [blame] | 49 | $(INDEXFILES): $(COMMONPERL) $(TOPDIR)/html/about.dat |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 50 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 51 | api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX) |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 52 | $(MKHTML) api $(L2HARGS) |
| 53 | |
| 54 | ext/ext.html: $(PAPERDIR)/ext.aux |
| 55 | $(MKHTML) ext $(L2HARGS) |
| 56 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 57 | lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX) |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 58 | $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux |
| 59 | mv lib1.aux `$(KPSEWHICH) lib.aux` |
| 60 | $(MKHTML) lib $(L2HARGS) |
| 61 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 62 | mac/mac.html: $(MACFILES) $(BUILDINDEX) |
Fred Drake | a8ba364 | 1998-11-30 20:28:35 +0000 | [diff] [blame] | 63 | $(TOOLSDIR)/mkhowto.sh --address '<hr>Send comments to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.' --html $(TOPDIR)/mac/mac.tex |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 64 | |
Fred Drake | 5d56d36 | 1999-01-05 15:49:39 +0000 | [diff] [blame] | 65 | ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX) |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 66 | $(MKHTML) ref $(L2HARGS) |
| 67 | |
| 68 | tut/tut.html: $(PAPERDIR)/tut.aux |
| 69 | $(MKHTML) tut $(L2HARGS) |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 70 | |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 71 | |
Fred Drake | 2e23c31 | 1998-10-07 22:03:45 +0000 | [diff] [blame] | 72 | include ../Makefile.deps |
| 73 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 74 | $(PAPERDIR)/api.aux: $(APIFILES) |
| 75 | (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 76 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 77 | $(PAPERDIR)/ext.aux: $(EXTFILES) |
| 78 | (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 79 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 80 | $(PAPERDIR)/lib.aux: $(LIBFILES) |
| 81 | (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 82 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 83 | $(PAPERDIR)/ref.aux: $(REFFILES) |
| 84 | (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 85 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 86 | $(PAPERDIR)/tut.aux: $(TUTFILES) |
| 87 | (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi) |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 88 | |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 89 | # copy the icons/ directory over... |
Fred Drake | 60515f4 | 1998-05-07 14:50:22 +0000 | [diff] [blame] | 90 | icons: |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 91 | mkdir icons/ |
Fred Drake | f832f4c | 1998-08-11 19:36:35 +0000 | [diff] [blame] | 92 | cp $(TOPDIR)/icons/*.gif icons/ |
Fred Drake | 07b12f2 | 1998-08-12 17:06:03 +0000 | [diff] [blame] | 93 | |
| 94 | |
| 95 | webcheck: |
| 96 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/ |
| 97 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/ |
| 98 | $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/ |
| 99 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/ |
| 100 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/ |
| 101 | $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/ |
| 102 | |
| 103 | clean: |
| 104 | rm -rf icons/ @webchecker.pickle |
| 105 | |
| 106 | clobber: clean |
| 107 | rm -rf api/ ext/ lib/ mac/ ref/ tut/ |