blob: e07604339db33669bd835d5ef6447e5868974a7e [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 \
Fred Drake54c52051998-08-13 19:03:19 +000029 $(TOPDIR)/perl/python.perl \
30 $(TOPDIR)/perl/l2hinit.perl
Fred Drakef832f4c1998-08-11 19:36:35 +000031
32
Fred Drake07b12f21998-08-12 17:06:03 +000033all: icons $(INDEXFILES)
34
35.PHONY: api ext lib mac ref tut
36
37api: icons api/api.html
38ext: icons ext/ext.html
39lib: icons lib/lib.html
40mac: icons mac/mac.html
41ref: icons ref/ref.html
42tut: icons tut/tut.html
43
44$(INDEXFILES): $(COMMONPERL)
45
46api/api.html: $(PAPERDIR)/api.aux
47 $(MKHTML) api $(L2HARGS)
48
49ext/ext.html: $(PAPERDIR)/ext.aux
50 $(MKHTML) ext $(L2HARGS)
51
52lib/lib.html: $(PAPERDIR)/lib.aux
53 $(TOOLSDIR)/fix_libaux.sed <`$(KPSEWHICH) lib.aux` >lib1.aux
54 mv lib1.aux `$(KPSEWHICH) lib.aux`
55 $(MKHTML) lib $(L2HARGS)
56
57mac/mac.html: $(MACFILES)
58 $(TOOLSDIR)/mkhowto.sh --html $(TOPDIR)/mac/mac.tex
59
60ref/ref.html: $(PAPERDIR)/ref.aux
61 $(MKHTML) ref $(L2HARGS)
62
63tut/tut.html: $(PAPERDIR)/tut.aux
64 $(MKHTML) tut $(L2HARGS)
Fred Drakef832f4c1998-08-11 19:36:35 +000065
Fred Drake60515f41998-05-07 14:50:22 +000066
Fred Drake07b12f21998-08-12 17:06:03 +000067$(PAPERDIR)/api.aux: $(APIFILES)
68 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000069
Fred Drake07b12f21998-08-12 17:06:03 +000070$(PAPERDIR)/ext.aux: $(EXTFILES)
71 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000072
Fred Drake07b12f21998-08-12 17:06:03 +000073$(PAPERDIR)/lib.aux: $(LIBFILES)
74 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000075
Fred Drake07b12f21998-08-12 17:06:03 +000076$(PAPERDIR)/ref.aux: $(REFFILES)
77 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000078
Fred Drake07b12f21998-08-12 17:06:03 +000079$(PAPERDIR)/tut.aux: $(TUTFILES)
80 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000081
Fred Drake07b12f21998-08-12 17:06:03 +000082# copy the icons/ directory over...
Fred Drake60515f41998-05-07 14:50:22 +000083icons:
Fred Drake07b12f21998-08-12 17:06:03 +000084 mkdir icons/
Fred Drakef832f4c1998-08-11 19:36:35 +000085 cp $(TOPDIR)/icons/*.gif icons/
Fred Drake07b12f21998-08-12 17:06:03 +000086
87
88webcheck:
89 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/
90 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/
91 $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/
92 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/
93 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/
94 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/
95
96clean:
97 rm -rf icons/ @webchecker.pickle
98
99clobber: clean
100 rm -rf api/ ext/ lib/ mac/ ref/ tut/