blob: dc6ecf4dd26779870690e87642c97c16653cd007 [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
21INDEXFILES=api/api.html \
22 ext/ext.html \
23 lib/lib.html \
24 mac/mac.html \
25 ref/ref.html \
26 tut/tut.html
27
28COMMONPERL= $(TOPDIR)/perl/manual.perl \
29 $(TOPDIR)/perl/python.perl
Fred Drakef832f4c1998-08-11 19:36:35 +000030
31
Fred Drake07b12f21998-08-12 17:06:03 +000032all: icons $(INDEXFILES)
33
34.PHONY: api ext lib mac ref tut
35
36api: icons api/api.html
37ext: icons ext/ext.html
38lib: icons lib/lib.html
39mac: icons mac/mac.html
40ref: icons ref/ref.html
41tut: icons tut/tut.html
42
43$(INDEXFILES): $(COMMONPERL)
44
45api/api.html: $(PAPERDIR)/api.aux
46 $(MKHTML) api $(L2HARGS)
47
48ext/ext.html: $(PAPERDIR)/ext.aux
49 $(MKHTML) ext $(L2HARGS)
50
51lib/lib.html: $(PAPERDIR)/lib.aux
52 $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
53 mv lib1.aux `$(KPSEWHICH) lib.aux`
54 $(MKHTML) lib $(L2HARGS)
55
56mac/mac.html: $(MACFILES)
57 $(TOOLSDIR)/mkhowto.sh --html $(TOPDIR)/mac/mac.tex
58
59ref/ref.html: $(PAPERDIR)/ref.aux
60 $(MKHTML) ref $(L2HARGS)
61
62tut/tut.html: $(PAPERDIR)/tut.aux
63 $(MKHTML) tut $(L2HARGS)
Fred Drakef832f4c1998-08-11 19:36:35 +000064
Fred Drake60515f41998-05-07 14:50:22 +000065
Fred Drake07b12f21998-08-12 17:06:03 +000066$(PAPERDIR)/api.aux: $(APIFILES)
67 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000068
Fred Drake07b12f21998-08-12 17:06:03 +000069$(PAPERDIR)/ext.aux: $(EXTFILES)
70 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000071
Fred Drake07b12f21998-08-12 17:06:03 +000072$(PAPERDIR)/lib.aux: $(LIBFILES)
73 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000074
Fred Drake07b12f21998-08-12 17:06:03 +000075$(PAPERDIR)/ref.aux: $(REFFILES)
76 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000077
Fred Drake07b12f21998-08-12 17:06:03 +000078$(PAPERDIR)/tut.aux: $(TUTFILES)
79 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000080
Fred Drake07b12f21998-08-12 17:06:03 +000081# copy the icons/ directory over...
Fred Drake60515f41998-05-07 14:50:22 +000082icons:
Fred Drake07b12f21998-08-12 17:06:03 +000083 mkdir icons/
Fred Drakef832f4c1998-08-11 19:36:35 +000084 cp $(TOPDIR)/icons/*.gif icons/
Fred Drake07b12f21998-08-12 17:06:03 +000085
86
87webcheck:
88 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/
89 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/
90 $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/
91 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/
92 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/
93 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/
94
95clean:
96 rm -rf icons/ @webchecker.pickle
97
98clobber: clean
99 rm -rf api/ ext/ lib/ mac/ ref/ tut/