blob: e6bf339aaa114c7807c6fafc288cb089d75a92e1 [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?
Fred Drake4d33e4e1999-02-15 19:29:08 +000016PYTHON= python
17WEBCHECKER=$(PYTHON) $(TOPDIR)/../Tools/webchecker/webchecker.py
18MKAUX= PAPER=$(PAPER) TEXINPUTS=$(TEXINPUTS) $(TOOLSDIR)/mkdvi.sh --aux
19MKHTML= PAPER=$(PAPER) $(TOOLSDIR)/mkhtml.sh
20KPSEWHICH= TEXINPUTS=$(TEXINPUTS) kpsewhich tex
Fred Drake07b12f21998-08-12 17:06:03 +000021
Fred Drake4d33e4e1999-02-15 19:29:08 +000022BUILDINDEX=$(TOOLSDIR)/buildindex.py
Fred Drake5d56d361999-01-05 15:49:39 +000023
Fred Drake5761b761999-02-12 21:42:23 +000024# make it clear to l2h, since our support only generates HTML 4.0
Fred Drake4d33e4e1999-02-15 19:29:08 +000025L2HARGS= -html_version 4.0
26
Fred Drakeb41f97d1999-03-04 21:25:05 +000027PYTHONDOCS='<hr>Send comments to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.'
Fred Drake4d33e4e1999-02-15 19:29:08 +000028HTMLBASE= file:`pwd`
Fred Drake5761b761999-02-12 21:42:23 +000029
Fred Drake07b12f21998-08-12 17:06:03 +000030INDEXFILES=api/api.html \
31 ext/ext.html \
32 lib/lib.html \
33 mac/mac.html \
34 ref/ref.html \
35 tut/tut.html
36
37COMMONPERL= $(TOPDIR)/perl/manual.perl \
Fred Drake54c52051998-08-13 19:03:19 +000038 $(TOPDIR)/perl/python.perl \
39 $(TOPDIR)/perl/l2hinit.perl
Fred Drakef832f4c1998-08-11 19:36:35 +000040
41
Fred Drake684f78f1999-02-24 17:34:12 +000042all: $(INDEXFILES) modindex.html
Fred Drake07b12f21998-08-12 17:06:03 +000043
44.PHONY: api ext lib mac ref tut
45
Fred Drake6f9dd5d1999-02-15 21:43:55 +000046api: api/api.html
47ext: ext/ext.html
48lib: lib/lib.html
49mac: mac/mac.html
50ref: ref/ref.html
51tut: tut/tut.html
Fred Drake07b12f21998-08-12 17:06:03 +000052
Fred Drakea8ba3641998-11-30 20:28:35 +000053$(INDEXFILES): $(COMMONPERL) $(TOPDIR)/html/about.dat
Fred Drake07b12f21998-08-12 17:06:03 +000054
Fred Drake684f78f1999-02-24 17:34:12 +000055modindex.html: lib/lib.html mac/mac.html $(TOOLSDIR)/mkmodindex
Fred Drake368b16a1999-03-02 15:56:19 +000056 $(TOOLSDIR)/mkmodindex --columns 4 --output modindex.html \
Fred Drakeb41f97d1999-03-04 21:25:05 +000057 --address $(PYTHONDOCS) \
Fred Drake684f78f1999-02-24 17:34:12 +000058 lib/modindex.html mac/modindex.html
59
Fred Drake5d56d361999-01-05 15:49:39 +000060api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX)
Fred Drake07b12f21998-08-12 17:06:03 +000061 $(MKHTML) api $(L2HARGS)
62
63ext/ext.html: $(PAPERDIR)/ext.aux
64 $(MKHTML) ext $(L2HARGS)
65
Fred Drake5d56d361999-01-05 15:49:39 +000066lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX)
Fred Drake07b12f21998-08-12 17:06:03 +000067 $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
68 mv lib1.aux `$(KPSEWHICH) lib.aux`
69 $(MKHTML) lib $(L2HARGS)
70
Fred Drake5d56d361999-01-05 15:49:39 +000071mac/mac.html: $(MACFILES) $(BUILDINDEX)
Fred Drakeb41f97d1999-03-04 21:25:05 +000072 $(TOOLSDIR)/mkhowto --address $(PYTHONDOCS) --html \
73 $(TOPDIR)/mac/mac.tex
Fred Drake07b12f21998-08-12 17:06:03 +000074
Fred Drake5d56d361999-01-05 15:49:39 +000075ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX)
Fred Drake07b12f21998-08-12 17:06:03 +000076 $(MKHTML) ref $(L2HARGS)
77
78tut/tut.html: $(PAPERDIR)/tut.aux
79 $(MKHTML) tut $(L2HARGS)
Fred Drakef832f4c1998-08-11 19:36:35 +000080
Fred Drake60515f41998-05-07 14:50:22 +000081
Fred Drake2e23c311998-10-07 22:03:45 +000082include ../Makefile.deps
83
Fred Drake07b12f21998-08-12 17:06:03 +000084$(PAPERDIR)/api.aux: $(APIFILES)
Fred Drake4d33e4e1999-02-15 19:29:08 +000085 (cd $(PAPERDIR); $(MKAUX) api)
Fred Drake60515f41998-05-07 14:50:22 +000086
Fred Drake07b12f21998-08-12 17:06:03 +000087$(PAPERDIR)/ext.aux: $(EXTFILES)
Fred Drake4d33e4e1999-02-15 19:29:08 +000088 (cd $(PAPERDIR); $(MKAUX) ext)
Fred Drake60515f41998-05-07 14:50:22 +000089
Fred Drake07b12f21998-08-12 17:06:03 +000090$(PAPERDIR)/lib.aux: $(LIBFILES)
Fred Drake4d33e4e1999-02-15 19:29:08 +000091 (cd $(PAPERDIR); $(MKAUX) lib)
Fred Drake60515f41998-05-07 14:50:22 +000092
Fred Drake07b12f21998-08-12 17:06:03 +000093$(PAPERDIR)/ref.aux: $(REFFILES)
Fred Drake4d33e4e1999-02-15 19:29:08 +000094 (cd $(PAPERDIR); $(MKAUX) ref)
Fred Drake60515f41998-05-07 14:50:22 +000095
Fred Drake07b12f21998-08-12 17:06:03 +000096$(PAPERDIR)/tut.aux: $(TUTFILES)
Fred Drake4d33e4e1999-02-15 19:29:08 +000097 (cd $(PAPERDIR); $(MKAUX) tut)
Fred Drake60515f41998-05-07 14:50:22 +000098
Fred Drake07b12f21998-08-12 17:06:03 +000099
Fred Drake4d33e4e1999-02-15 19:29:08 +0000100webcheck: all
101 $(WEBCHECKER) $(HTMLBASE)/api/
102 $(WEBCHECKER) $(HTMLBASE)/ext/
103 $(WEBCHECKER) -m290000 $(HTMLBASE)/lib/
104 $(WEBCHECKER) $(HTMLBASE)/mac/
105 $(WEBCHECKER) $(HTMLBASE)/ref/
106 $(WEBCHECKER) $(HTMLBASE)/tut/
Fred Drake07b12f21998-08-12 17:06:03 +0000107
108clean:
Fred Drake6f9dd5d1999-02-15 21:43:55 +0000109 rm -rf @webchecker.pickle
Fred Drake07b12f21998-08-12 17:06:03 +0000110
111clobber: clean
112 rm -rf api/ ext/ lib/ mac/ ref/ tut/