blob: 87d231d511abc73190d88d1ef12fe53fb0bbbd77 [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 Drake2e23c311998-10-07 22:03:45 +000067include ../Makefile.deps
68
Fred Drake07b12f21998-08-12 17:06:03 +000069$(PAPERDIR)/api.aux: $(APIFILES)
70 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000071
Fred Drake07b12f21998-08-12 17:06:03 +000072$(PAPERDIR)/ext.aux: $(EXTFILES)
73 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000074
Fred Drake07b12f21998-08-12 17:06:03 +000075$(PAPERDIR)/lib.aux: $(LIBFILES)
76 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000077
Fred Drake07b12f21998-08-12 17:06:03 +000078$(PAPERDIR)/ref.aux: $(REFFILES)
79 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000080
Fred Drake07b12f21998-08-12 17:06:03 +000081$(PAPERDIR)/tut.aux: $(TUTFILES)
82 (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi)
Fred Drake60515f41998-05-07 14:50:22 +000083
Fred Drake07b12f21998-08-12 17:06:03 +000084# copy the icons/ directory over...
Fred Drake60515f41998-05-07 14:50:22 +000085icons:
Fred Drake07b12f21998-08-12 17:06:03 +000086 mkdir icons/
Fred Drakef832f4c1998-08-11 19:36:35 +000087 cp $(TOPDIR)/icons/*.gif icons/
Fred Drake07b12f21998-08-12 17:06:03 +000088
89
90webcheck:
91 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/api/
92 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ext/
93 $(WEBCHECKER) -m290000 file:`pwd`/$(HTMLDIR)/lib/
94 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/mac/
95 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/ref/
96 $(WEBCHECKER) file:`pwd`/$(HTMLDIR)/tut/
97
98clean:
99 rm -rf icons/ @webchecker.pickle
100
101clobber: clean
102 rm -rf api/ ext/ lib/ mac/ ref/ tut/