-
Notifications
You must be signed in to change notification settings - Fork 790
Expand file tree
/
Copy pathMakefile
More file actions
370 lines (303 loc) · 10.4 KB
/
Makefile
File metadata and controls
370 lines (303 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# Makefile to generate the CSS2 document based on its "source files"
# Arnaud Le Hors - lehors@w3.org
# $Id: Makefile,v 1.34 1997-10-03 22:09:37 ian Exp $
ROOT = .
# the following files are part of the CSS specification
SRCS0 = \
$(ROOT)/cover.src
SRCS1 = \
about.src\
intro.src\
convent.src\
syndata.src\
selector.src\
cascade.src\
media.src\
flowobj.src\
flowobj2.src\
page.src\
colors.src\
fonts.src\
text.src\
lists.src\
tables.src\
ui.src\
aural.src
APPSRCS = \
sample.src\
changes.src\
notes.src\
grammar.src
REFSRCS = \
refs.src
INDEXSRCS= \
index.src
MAINSRCS = $(SRCS1)
MAINOBJS = \
cover.html\
about.html\
intro.html\
convent.html\
syndata.html\
selector.html\
cascade.html\
media.html\
flowobj.html\
flowobj2.html\
page.html\
colors.html\
fonts.html\
text.html\
lists.html\
tables.html\
ui.html\
aural.html
APPENDIXES= \
sample.html\
changes.html\
notes.html\
grammar.html
REFS= \
refs.html
INDEXES= \
index.html
SPECSRCS= $(SRCS0) $(MAINSRCS) $(APPSRCS)
SPECOBJS= $(MAINOBJS) $(APPENDIXES) $(REFS)
IMAGES= images/*.gif
STYLESHEETS= style/*.css
ALLOBJS= $(SPECOBJS) $(INDEXES) $(IMAGES) $(STYLESHEETS) translations.html
PROPSRC= properties/properties.db
DESCSRC= properties/descriptors.db
PROPBLKSDIR= build/properties
DESCBLKSDIR= build/descriptors
CSSGROUPDIR = /afs/w3.org/pub/WWW/Style/Group/
#Sample install dir
#INSTALLDIR= /afs/w3.org/pub/WWW/Style/Group/9709/css2-970908
INSTALLDIR=
# dbase for property name anchors
PROPERTYDB= build/property.db
# dbase for descriptor name anchors
DESCRIPTORDB= build/descriptor.db
# dbase for value types
VALUEDB= build/value.db
# dbase for heading dbase
HEADINGDB= build/headings.db
PERL= perl5
NSGMLS=nsgmls
# HTML include preprocessor (for includes)
HIPP= $(PERL) ./bin/hipp
# make depend utility for CSS source documents
HMKDEPEND= $(PERL) ./bin/hmkdep
# make value anchor database
MKANCHDB= $(PERL) ./bin/mkanchdb
# make property and descriptor anchor database
MKPANCHDB= $(PERL) ./bin/mkpanchdb
# add heading anchors
ADDHANCH= $(PERL) ./bin/addhanch
# add index anchors and generate related index database
ADDIDXANCH= $(PERL) ./bin/addianch
# add navigation bars
ADDNAVBAR= $(PERL) ./bin/addnavbar
# make CSS Index
MKIDX= $(PERL) ./bin/mkidx
# make table of contents and heading database
MKTOC= $(PERL) ./bin/mktoc
# HTML concate utility
HTMLCAT= $(PERL) ./bin/htmlcat
# trim utility to get rid of navbar sections
HTMLTRIM= $(PERL) ./bin/htmltrim
# make sub table of contents
MKSUBTOC=$(PERL) ./bin/mksubtoc
# insert subtoc
INSAFTER= $(PERL) ./bin/insafter
# add link
ADDLINKS= $(PERL) ./bin/addlinks
# extract properties from db.
PEXTR= $(PERL) ./bin/pextr
# extract descriptors from db.
DEXTR= $(PERL) ./bin/dextr
# extract issues from issues db.
ISSUES= bin/issues
# extract issues from todo db.
TODO= bin/todo
# utility to generate the PostScript version
# -R seems broken for this spec.
HTML2PS= $(PERL) ./bin/html2ps -f html2psrc
# PS -> GIF tools
#PSTOPNM = ./bin/mypstopnm -r 75
PSTOPNM = ./bin/mypstopnm -r 150
#PNMTOGIF_PIPE = ppmquant 256 | ppmtogif
PNMTOGIF_PIPE = pnmscale 0.5 | pnmgamma 1.8 | ppmquant 256 | ppmtogif
# include paths
INCLUDES= -Ibuild -I.
RM= rm -fr
CP= cp
TAR= tar
ZIP= zip
LN= ln
.SUFFIXES: .src .html .srb .idraw .gif
.src.html:
@if [ ! -d build/index ]; then mkdir -p build/index; fi
echo "<div class=\"subtoc\"><p><strong>Contents</strong>" \
> build/subtoc.$$$$; \
$(MKSUBTOC) -r $@ -l 2 - $(HEADINGDB) $< >> build/subtoc.$$$$; \
echo "</div>" >> build/subtoc.$$$$; \
$(HIPP) $(INCLUDES) $< - | $(ADDHANCH) -n -ml 3 -r $< - - $(HEADINGDB) | \
$(ADDIDXANCH) -r $< - - build/index/$<.db | \
$(ADDLINKS) -r $< - - propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB) | \
$(ADDNAVBAR) -r $@ - - contents "cover.html#toc" index index.html| \
$(INSAFTER) - build/subtoc.$$$$ /H1 $@; \
$(RM) build/subtoc.$$$$
.idraw.gif:
$(RM) $@
# $(PSTOPNM) $< | $(PPMQUANT) | $(PPMTOGIF) >$@
$(PSTOPNM) $< \
| $(PNMTOGIF_PIPE) >$@
all: blocks $(PROPERTYDB) $(DESCRIPTORDB) $(VALUEDB) $(HEADINGDB) $(SPECOBJS) $(INDEXES) \
$(IMAGES) issues.html DOC/TODO.html
install: all css20.tgz
@if [ ! -d $(INSTALLDIR) ]; then mkdir -p $(INSTALLDIR);fi
$(CP) css20.tgz $(INSTALLDIR)
(cd $(INSTALLDIR); $(TAR) xvzf css20.tgz)
(cd $(CSSGROUPDIR); rm -f issues.html; \
$(LN) $(INSTALLDIR)/issues.html css2-issues.html)
$(CP) Overview.html html2psrc $(INSTALLDIR)
install-all: install css20.zip css20.ps css20.txt
$(CP) css20.zip css20.ps css20.txt $(INSTALLDIR)
#### Special section to build PS file and single plain text file
css20.ps ps: all
$(HTML2PS) $(MAINOBJS) $(APPENDIXES) $(REFS) $(INDEXES) > $@
css20.html html: all
$(HTMLCAT) - $(MAINOBJS) $(APPENDIXES) $(REFS) $(INDEXES) | \
$(HTMLTRIM) div navbar - $@
# the following requires to be on unix and have Netscape running...
css20.txt txt: css20.html
$(RM) css20.txt; \
netscape -remote "openFile(`pwd`/css20.html)" -remote "saveAs(`pwd`/css20.txt,Text)"
####
css20.tgz: all
$(TAR) czf $@ $(ALLOBJS)
css20.zip: all
$(ZIP) $@ $(ALLOBJS)
#### Section generate property/descriptor tables from property database.
blocks: $(PROPBLKSDIR)/blocks.ok $(DESCBLKSDIR)/blocks.ok
$(PROPBLKSDIR)/blocks.ok: $(PROPSRC)
@if [ ! -d $(PROPBLKSDIR) ]; then mkdir -p $(PROPBLKSDIR);fi
$(PEXTR) $(PROPSRC) $(PROPBLKSDIR)
touch $@
$(DESCBLKSDIR)/blocks.ok: $(DESCSRC)
@if [ ! -d $(DESCBLKSDIR) ]; then mkdir -p $(DESCBLKSDIR);fi
$(DEXTR) $(DESCSRC) $(DESCBLKSDIR)
touch $@
$(PROPERTYDB): $(SPECSRCS)
@if [ ! -d build ]; then mkdir build;fi
$(MKPANCHDB) properties propdef - $(SPECSRCS) | sed 's/\.src/\.html/' > $@
$(DESCRIPTORDB): $(SPECSRCS)
@if [ ! -d build ]; then mkdir build;fi
$(MKPANCHDB) descriptors descdef - $(SPECSRCS) | sed 's/\.src/\.html/' > $@
$(VALUEDB): $(SPECSRCS)
$(MKANCHDB) value-def - $(SPECSRCS) | sed 's/\.src/\.html/' > $@
index.html: build/index.srb
build/index.srb: $(SPECOBJS)
$(MKIDX) $@ build/index/*
cover.html: cover.src cover-info.src build/contents.srb
$(HIPP) $(INCLUDES) $< - | \
$(ADDNAVBAR) -bottom -hr -r $@ - $@ "go to the table of contents" "#toc"
build/contents.srb: $(MAINSRCS) $(INDEXSRCS) $(APPSRCS) $(REFSRCS)
$(MKTOC) -ml 5 $@ $(HEADINGDB) $(MAINSRCS) -ul -roman $(APPSRCS) \
-ol -none $(REFSRCS) $(INDEXSRCS)
$(ADDLINKS) -r $< $(HEADINGDB) $(HEADINGDB) propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB)
$(ADDLINKS) -r $< $@ $@ propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB)
$(HEADINGDB): build/contents.srb
# special rule with different numbering
sample.html: sample.src
@if [ ! -d build/index ]; then mkdir -p build/index; fi
echo "<div class=\"subtoc\"><p><strong>Contents</strong>" \
> build/subtoc.$$$$; \
$(MKSUBTOC) -r $@ -l 2 - $(HEADINGDB) $< >> build/subtoc.$$$$; \
echo "</div>" >> build/subtoc.$$$$; \
$(ADDHANCH) -n -l 2 -ml 4 $< - $(HEADINGDB) | \
$(ADDIDXANCH) -r $< - - build/index/$<.db | \
$(ADDLINKS) -r $< - - propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB) | \
$(ADDNAVBAR) -r $@ - - contents "cover.html#toc" index index.html| \
$(INSAFTER) - build/subtoc.$$$$ /H1 $@; \
$(RM) build/subtoc.$$$$
changes.html: changes.src
@if [ ! -d build/index ]; then mkdir -p build/index; fi
echo "<div class=\"subtoc\"><p><strong>Contents</strong>" \
> build/subtoc.$$$$; \
$(MKSUBTOC) -r $@ -l 2 - $(HEADINGDB) $< >> build/subtoc.$$$$; \
echo "</div>" >> build/subtoc.$$$$; \
$(ADDHANCH) -n -l 2 -ml 4 $< - $(HEADINGDB) | \
$(ADDIDXANCH) -r $< - - build/index/$<.db | \
$(ADDLINKS) -r $< - - propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB) | \
$(ADDNAVBAR) -r $@ - - contents "cover.html#toc" index index.html| \
$(INSAFTER) - build/subtoc.$$$$ /H1 $@; \
$(RM) build/subtoc.$$$$
notes.html: notes.src
@if [ ! -d build/index ]; then mkdir -p build/index; fi
echo "<div class=\"subtoc\"><p><strong>Contents</strong>" \
> build/subtoc.$$$$; \
$(MKSUBTOC) -r $@ -l 2 - $(HEADINGDB) $< >> build/subtoc.$$$$; \
echo "</div>" >> build/subtoc.$$$$; \
$(ADDHANCH) -n -l 2 -ml 4 $< - $(HEADINGDB) | \
$(ADDIDXANCH) -r $< - - build/index/$<.db | \
$(ADDLINKS) -r $< - - propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB) | \
$(ADDNAVBAR) -r $@ - - contents "cover.html#toc" index index.html| \
$(INSAFTER) - build/subtoc.$$$$ /H1 $@; \
$(RM) build/subtoc.$$$$
grammar.html: grammar.src
@if [ ! -d build/index ]; then mkdir -p build/index; fi
echo "<div class=\"subtoc\"><p><strong>Contents</strong>" \
> build/subtoc.$$$$; \
$(MKSUBTOC) -r $@ -l 2 - $(HEADINGDB) $< >> build/subtoc.$$$$; \
echo "</div>" >> build/subtoc.$$$$; \
$(ADDHANCH) -n -l 2 -ml 4 $< - $(HEADINGDB) | \
$(ADDIDXANCH) -r $< - - build/index/$<.db | \
$(ADDLINKS) -r $< - - propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB) | \
$(ADDNAVBAR) -r $@ - - contents "cover.html#toc" index index.html| \
$(INSAFTER) - build/subtoc.$$$$ /H1 $@; \
$(RM) build/subtoc.$$$$
refs.html: refs.src
@if [ ! -d build/index ]; then mkdir -p build/index; fi
echo "<div class=\"subtoc\"><p><strong>Contents</strong>" \
> build/subtoc.$$$$; \
$(MKSUBTOC) -r $@ -l 2 - $(HEADINGDB) $< >> build/subtoc.$$$$; \
echo "</div>" >> build/subtoc.$$$$; \
$(ADDHANCH) -n -l 2 -ml 4 $< - $(HEADINGDB) | \
$(ADDIDXANCH) -r $< - - build/index/$<.db | \
$(ADDLINKS) -r $< - - propinst $(PROPERTYDB) descinst $(DESCRIPTORDB) value-inst $(VALUEDB) | \
$(ADDNAVBAR) -r $@ - - contents "cover.html#toc" index index.html| \
$(INSAFTER) - build/subtoc.$$$$ /H1 $@; \
$(RM) build/subtoc.$$$$
# simpler rules for special pages
index.html: index.src
$(HIPP) $(INCLUDES) $< - | \
$(ADDNAVBAR) -r $@ - $@ contents "cover.html#toc"
issues.html: issues.src build/issues.srb
$(HIPP) $(INCLUDES) issues.src $@
build/issues.srb: issues.db
$(ISSUES) -g >$@
DOC/TODO.html: DOC/TODO.src build/todo.srb
$(HIPP) $(INCLUDES) DOC/TODO.src $@
build/todo.srb: DOC/todo.db
$(TODO) -g >$@
### check on the document to see if it's valid
check: all
@for i in $(MAINOBJS) $(APPENDIXES) $(REFS) $(INDEXES) ; \
do echo checking $$i...; $(NSGMLS) -s -c sgml/HTML4.cat $$i; done; \
echo checking done.
# get cvs logs
FROMDATE=1 week ago
log:
@for i in `cat DOC/FILES` ; \
do cvs log -d ">$(FROMDATE)" $$i >/tmp/log; \
grep "selected revisions: 0" /tmp/log >/dev/null || cat /tmp/log; \
done; rm /tmp/log
clean:
$(RM) $(SPECOBJS) $(SPECIALOBJS) $(INDEXES) $(PROPBLKSDIR)/* \
$(DESCBLKSDIR)/* build/* css20.*
realclean: clean
depend:
$(HMKDEPEND) $(SPECOBJS) $(SPECIALOBJS)
##### The following is automatically generated. Do not edit!! ####