Skip to content

Commit 6a287bf

Browse files
committed
[css2] Now creates PNG images as well as GIF. Removes .gif extensions from
all image links. All css20* files are now called css2*. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40953
1 parent a272941 commit 6a287bf

1 file changed

Lines changed: 28 additions & 17 deletions

File tree

css2/Makefile

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile to generate the CSS2 document based on its "source files"
22
# Arnaud Le Hors - lehors@w3.org
3-
# $Id: Makefile,v 2.7 1998-02-17 00:23:30 ijacobs Exp $
3+
# $Id: Makefile,v 2.8 1998-02-17 23:44:39 bbos Exp $
44

55
# what needs to be set for every new release:
66
# Note use of full year (1998) in identifier.
@@ -97,7 +97,7 @@ indexlist.html
9797
SPECSRCS= $(SRCS0) $(MAINSRCS) $(APPSRCS)
9898
SPECOBJS= $(MAINOBJS) $(APPENDIXES) $(REFS)
9999

100-
IMAGES = images/*.gif
100+
IMAGES = images/*.gif images/*.png
101101
STYLESHEETS= style/*.css
102102

103103
ALLOBJS= $(SPECOBJS) $(INDEXES) $(IMAGES) $(STYLESHEETS) translations.html
@@ -187,6 +187,8 @@ MKHEADINGDB = $(PERL) ./bin/mkheadingdb
187187
MKCHAIN = $(PERL) ./bin/mkchain
188188
# Expand [[cite]] to link to bibliography
189189
ADDCITE = $(PERL) ./bin/addcite
190+
# Remove extensions (.gif, .png,...) from IMG links
191+
RMIMGEXT = $(PERL) ./bin/rmimgext
190192

191193
# utility to generate the PostScript version
192194
#
@@ -196,7 +198,10 @@ HTML2PS= $(PERL) bin/html2ps -d -f html2psrc
196198
#PSTOPNM = ./bin/mypstopnm -r 75
197199
PSTOPNM = ./bin/mypstopnm -r 150
198200
#PNMTOGIF_PIPE = ppmquant 256 | ppmtogif
199-
PNMTOGIF_PIPE = pnmscale 0.5 | pnmgamma 1.8 | ppmquant 256 | ppmtogif
201+
PNMTOGIF_PIPE = pnmscale 0.5 | pnmgamma 1.8 | ppmquant -fs 256 | ppmtogif
202+
203+
# idraw -> png
204+
PNMTOPNG_PIPE = pnmscale 0.5 | pnmgamma 1.8 | pnmtopng -gamma 1.8
200205

201206
# include paths
202207
INCLUDES= -Ibuild -I.
@@ -207,7 +212,7 @@ TAR= tar
207212
ZIP= zip
208213
LN= ln
209214

210-
.SUFFIXES: .src .html .srd .idraw .gif .ps .subtoc
215+
.SUFFIXES: .src .html .srd .idraw .gif .ps .subtoc .png
211216

212217
%.subtoc: %.srd Project.cfg
213218
@echo "=========== making" $@
@@ -222,6 +227,7 @@ LN= ln
222227
$(ADDIDXANCH) -r $@ $(INDEXDB) - |\
223228
$(ADDNAVBAR) -r $@ |\
224229
$(INSAFTER) - $*.subtoc /H1 - |\
230+
$(RMIMGEXT) |\
225231
$(MKCHAIN) -r $@ - $@
226232

227233
%.srd: %.src build/blocks.ok $(REFSRC:.src=.srd)
@@ -238,54 +244,59 @@ LN= ln
238244
# $(PSTOPNM) $< | $(PPMQUANT) | $(PPMTOGIF) >$@
239245
$(PSTOPNM) $< | $(PNMTOGIF_PIPE) >$@
240246

247+
.idraw.png:
248+
$(RM) $@
249+
$(PSTOPNM) $< | $(PNMTOPNG_PIPE) >$@
250+
241251
all: build/blocks.ok $(SPECOBJS) $(INDEXES) \
242252
$(IMAGES) issues.html DOC/TODO.html
243253

244-
install: all css20.tgz
254+
install: all css2.tgz
245255
@if [ -z "$(INSTALLDIR)" ]; then\
246256
echo >&2;\
247257
echo "*** No target directory specified" >&2;\
248258
echo "*** Please use: make install INSTALLDIR=<target-dir>" >&2;\
249259
exit 1;\
250260
fi
251261
@if [ ! -d $(INSTALLDIR) ]; then mkdir -p $(INSTALLDIR);fi
252-
$(CP) css20.tgz $(INSTALLDIR)
253-
(cd $(INSTALLDIR); zcat css20.tgz | $(TAR) xvf -)
262+
$(CP) css2.tgz $(INSTALLDIR)
263+
(cd $(INSTALLDIR); zcat css2.tgz | $(TAR) xvf -)
254264
-$(RM) -f $(CSSGROUPDIR)/issues.html
255265
-$(RM) $(CSSGROUPDIR)/css2-issues.html
256266
$(LN) -s $(INSTALLDIR)/issues.html $(CSSGROUPDIR)/css2-issues.html
257267
$(LN) -s $(INSTALLDIR)/cover.html $(INSTALLDIR)Overview.html
258268
-$(RM) -f $(TR_DIR)/$(PERMANENT_NAME)
259269
$(LN) -s $(INSTALLDIR) $(TR_DIR)/$(PERMANENT_NAME)
260270

261-
install-all: install css20.zip css20.ps css20.txt
262-
$(CP) css20.zip css20.ps css20.txt $(INSTALLDIR)
271+
install-all: install css2.zip css2.ps css2.txt
272+
$(CP) css2.zip css2.ps css2.txt $(INSTALLDIR)
263273

264274
#### Special section to build PS file and single plain text file
265275

266-
css20.ps ps: all
276+
css2.ps ps: all
267277
# Because of memory limitations in html2ps, use the
268278
# automagic feature that any *.gif files are not
269279
# converted to ps if there's a *.ps file in the same
270280
# directory.
271281
-@(cd images; for i in *.idraw; do $(LN) -s $$i "`basename $$i .idraw`.ps"; done)
282+
-@(cd images; for i in *.gif; do $(LN) -s $$i "`basename $$i .gif`"; done)
272283
$(HTML2PS) $(MAINOBJS) $(APPENDIXES) $(REFS) $(INDEXES) > $@
273284

274-
css20.html html: all
285+
css2.html html: all
275286
$(HTMLCAT) - $(MAINOBJS) $(APPENDIXES) $(REFS) $(INDEXES) | \
276287
$(HTMLTRIM) div navbar - $@
277288

278289
# the following requires to be on unix and have Netscape running...
279-
css20.txt txt: css20.html
280-
$(RM) css20.txt; \
281-
netscape -remote "openFile(`pwd`/css20.html)" -remote "saveAs(`pwd`/css20.txt,Text)"
290+
css2.txt txt: css2.html
291+
$(RM) css2.txt; \
292+
netscape -remote "openFile(`pwd`/css2.html)" -remote "saveAs(`pwd`/css2.txt,Text)"
282293

283294
####
284295

285-
css20.tgz: $(ALLOBJS)
296+
css2.tgz: $(ALLOBJS)
286297
$(TAR) cf - $(ALLOBJS) | gzip >$@
287298

288-
css20.zip: $(ALLOBJS)
299+
css2.zip: $(ALLOBJS)
289300
$(ZIP) $@ $(ALLOBJS)
290301

291302
#### Section generate property/descriptor tables from property database.
@@ -497,7 +508,7 @@ log:
497508
clean:
498509
$(RM) $(SPECOBJS) $(INDEXES) $(PROPBLKSDIR)/* \
499510
$(SPECOBJS:.html=.srd) $(SPECOBJS:.html=.subtoc) \
500-
$(DESCBLKSDIR)/* build/* css20.* linklint
511+
$(DESCBLKSDIR)/* build/* css2.* linklint
501512

502513
realclean: clean
503514

0 commit comments

Comments
 (0)