blob: 0fafaf4caa31262c98841d099b7150a448cfd6e8 [file] [log] [blame]
Fred Drake60515f41998-05-07 14:50:22 +00001# 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 Drake07b12f21998-08-12 17:06:03 +00008PAPER=letter
Fred Drakef832f4c1998-08-11 19:36:35 +00009TOPDIR=..
Fred Drake07b12f21998-08-12 17:06:03 +000010TOOLSDIR=$(TOPDIR)/tools
11PAPERDIR=$(TOPDIR)/paper-$(PAPER)
Fred Drakef832f4c1998-08-11 19:36:35 +000012
Fred Drake07b12f21998-08-12 17:06:03 +000013TEXINPUTS=$(TOPDIR)/paper-$(PAPER):$(TOPDIR)/texinputs:
14
15# Where are the various programs?
16PYTHON= python
17WEBCHECKER= $(PYTHON) $(TOPDIR)/../Tools/webchecker/webchecker.py
18MKHTML= PAPER=$(PAPER) $(TOOLSDIR)/mkhtml.sh
19KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex
20
Fred Drake5d56d361999-01-05 15:49:39 +000021BUILDINDEX= $(TOOLSDIR)/buildindex.py
22
Fred Drake5761b761999-02-12 21:42:23 +000023# make it clear to l2h, since our support only generates HTML 4.0
24L2HARGS= -html_version 4.0
25
Fred Drake07b12f21998-08-12 17:06:03 +000026INDEXFILES=api/api.html \
27 ext/ext.html \
28 lib/lib.html \
29 mac/mac.html \
30 ref/ref.html \
31 tut/tut.html
32
33COMMONPERL= $(TOPDIR)/perl/manual.perl \
Fred Drake54c52051998-08-13 19:03:19 +000034 $(TOPDIR)/perl/python.perl \
35 $(TOPDIR)/perl/l2hinit.perl
Fred Drakef832f4c1998-08-11 19:36:35 +000036
37
Fred Drake07b12f21998-08-12 17:06:03 +000038all: icons $(INDEXFILES)
39
40.PHONY: api ext lib mac ref tut
41
42api: icons api/api.html
43ext: icons ext/ext.html
44lib: icons lib/lib.html
45mac: icons mac/mac.html
46ref: icons ref/ref.html
47tut: icons tut/tut.html
48
Fred Drakea8ba3641998-11-30 20:28:35 +000049$(INDEXFILES): $(COMMONPERL) $(TOPDIR)/html/about.dat
Fred Drake07b12f21998-08-12 17:06:03 +000050
Fred Drake5d56d361999-01-05 15:49:39 +000051api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX)
Fred Drake07b12f21998-08-12 17:06:03 +000052 $(MKHTML) api $(L2HARGS)
53
54ext/ext.html: $(PAPERDIR)/ext.aux
55 $(MKHTML) ext $(L2HARGS)
56
Fred Drake5d56d361999-01-05 15:49:39 +000057lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX)
Fred Drake07b12f21998-08-12 17:06:03 +000058 $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
59 mv lib1.aux `$(KPSEWHICH) lib.aux`
60 $(MKHTML) lib $(L2HARGS)
61
Fred Drake5d56d361999-01-05 15:49:39 +000062mac/mac.html: $(MACFILES) $(BUILDINDEX)
Fred Drakea8ba3641998-11-30 20:28:35 +000063 $(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 Drake07b12f21998-08-12 17:06:03 +000064
Fred Drake5d56d361999-01-05 15:49:39 +000065ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX)
Fred Drake07b12f21998-08-12 17:06:03 +000066 $(MKHTML) ref $(L2HARGS)
67
68tut/tut.html: $(PAPERDIR)/tut.aux
69 $(MKHTML) tut $(L2HARGS)
Fred Drakef832f4c1998-08-11 19:36:35 +000070
Fred Drake60515f41998-05-07 14:50:22 +000071
Fred Drake2e23c311998-10-07 22:03:45 +000072include ../Makefile.deps
73
Fred Drake07b12f21998-08-12 17:06:03 +000074$(PAPERDIR)/api.aux: $(APIFILES)
75 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000076
Fred Drake07b12f21998-08-12 17:06:03 +000077$(PAPERDIR)/ext.aux: $(EXTFILES)
78 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000079
Fred Drake07b12f21998-08-12 17:06:03 +000080$(PAPERDIR)/lib.aux: $(LIBFILES)
81 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000082
Fred Drake07b12f21998-08-12 17:06:03 +000083$(PAPERDIR)/ref.aux: $(REFFILES)
84 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000085
Fred Drake07b12f21998-08-12 17:06:03 +000086$(PAPERDIR)/tut.aux: $(TUTFILES)
87 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000088
Fred Drake07b12f21998-08-12 17:06:03 +000089# copy the icons/ directory over...
Fred Drake60515f41998-05-07 14:50:22 +000090icons:
Fred Drake07b12f21998-08-12 17:06:03 +000091 mkdir icons/
Fred Drakef832f4c1998-08-11 19:36:35 +000092 cp $(TOPDIR)/icons/*.gif icons/
Fred Drake07b12f21998-08-12 17:06:03 +000093
94
95webcheck:
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
103clean:
104 rm -rf icons/ @webchecker.pickle
105
106clobber: clean
107 rm -rf api/ ext/ lib/ mac/ ref/ tut/