]> git.decadent.org.uk Git - ion3.git/blob - doc/Makefile
aa203d8939c946cd6d2803e3f6174d70becd457d
[ion3.git] / doc / Makefile
1 # Settings
2 ######################################
3
4 TOPDIR=../ion-3
5
6 include $(TOPDIR)/build/system-inc.mk
7
8 L2H=latex2html -show_section_numbers -short_index -local_icons -noaddress \
9     -up_url http://iki.fi/tuomov/ion/ -up_title "Ion homepage" -nofootnode\
10 ##    -style greyviolet.css
11
12
13 # Function documentation to build
14 ######################################
15
16 DOCS=ionconf ionnotes
17
18 FNTEXES=ioncore-fns.tex mod_tiling-fns.tex \
19         mod_query-fns.tex de-fns.tex mod_menu-fns.tex \
20         mod_dock-fns.tex mod_sp-fns.tex mod_statusbar-fns.tex
21
22 # Generic rules
23 ######################################
24
25 nothing:
26         @ echo "Please read the README first."
27
28 %.ps: %.dvi
29         dvips $<
30
31 %.pdf: %.dvi
32         dvipdfm -p a4 $<
33
34 %.dvi: %.tex
35         latex $<
36
37 # Install
38 ######################################
39
40 install:
41         $(INSTALLDIR) $(DOCDIR); \
42         for d in $(DOCS); do \
43             for e in ps pdf dvi; do \
44               test -f $$d.$$e && $(INSTALL) -m $(DATA_MODE) $$d.$$e $(DOCDIR); \
45             done; \
46             $(INSTALLDIR) $(DOCDIR)/$$d; \
47             for i in $$d/*; do \
48                 $(INSTALL) -m $(DATA_MODE) $$i $(DOCDIR)/$$i; \
49             done; \
50         done
51
52 # ionconf rules
53 ######################################
54 ionconf-dvi-full:
55         latex ionconf
56         latex ionconf
57         latex ionconf
58         makeindex ionconf.idx
59         latex ionconf
60
61 ionconf-html: 
62         $(L2H) -split 3 ionconf
63
64 fntexes: $(FNTEXES)
65
66 ionconf-all: fntexes fnlist.tex ionconf-dvi-full ionconf-html
67
68 # ionnotes rules
69 ######################################
70
71 ionnotes-dvi-full:
72         latex ionnotes
73         latex ionnotes
74         latex ionnotes
75         makeindex ionnotes.idx
76         latex ionnotes
77
78 ionnotes-html: 
79         $(L2H) -split 4 ionnotes
80
81 ionnotes-all: ionnotes-dvi-full ionnotes-html
82
83 # More generic rules
84 ######################################
85
86 all: ionconf-all ionnotes-all
87
88 all-ps: ionconf.ps ionnotes.ps
89
90 all-pdf: ionconf.pdf ionnotes.pdf
91
92
93 # Clean
94 ######################################
95
96 clean:
97         rm -f $(FNTEXES) fnlist.tex
98         rm -f *.aux *.toc *.log
99         rm -f *.idx *.ild *.ilg *.ind
100         
101 realclean: clean
102         rm -f *.ps *.pdf *.dvi
103         rm -rf $(DOCS)
104
105
106 # Function reference rules
107 ######################################
108
109 ioncore-fns.tex: $(TOPDIR)/ioncore/*.c $(TOPDIR)/ioncore/*.lua
110         $(MKEXPORTS) -module ioncore -mkdoc -o $@ $+
111
112 mod_tiling-fns.tex: $(TOPDIR)/mod_tiling/*.c
113         $(MKEXPORTS) -module mod_tiling -mkdoc -o $@ $+
114
115 mod_query-fns.tex: $(TOPDIR)/mod_query/*.c $(TOPDIR)/mod_query/mod_query.lua
116         $(MKEXPORTS) -module mod_query -mkdoc -o $@ $+
117
118 mod_menu-fns.tex: $(TOPDIR)/mod_menu/*.c $(TOPDIR)/mod_menu/mod_menu.lua
119         $(MKEXPORTS) -module mod_menu -mkdoc -o $@ $+
120
121 mod_dock-fns.tex: $(TOPDIR)/mod_dock/*.c
122         $(MKEXPORTS) -module mod_dock -mkdoc -o $@ $+
123
124 mod_sp-fns.tex: $(TOPDIR)/mod_sp/*.c
125         $(MKEXPORTS) -module mod_sp -mkdoc -o $@ $+
126
127 mod_statusbar-fns.tex: $(TOPDIR)/mod_statusbar/*.c
128         $(MKEXPORTS) -module mod_statusbar -mkdoc -o $@ $+
129
130 de-fns.tex: $(TOPDIR)/de/*.c
131         $(MKEXPORTS) -module de -mkdoc -o $@ $+
132
133 # Function list
134 ######################################
135
136 fnlist.tex: $(FNTEXES)
137         grep hyperlabel $+ | \
138         sed 's/.*fn:\([^}]*\).*/\\fnlisti{\1}/;'|sort -d -f \
139         > $@