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
|
docs = sag.sgml
figs = overview-kernel.fig backup-timeline.fig fstree.fig hd-layout.fig \
hd-mount-mounted.fig hd-mount-separate.fig hd-schematic.fig \
logins-via-terminals.fig
# You should not need to touch anything below this.
HTML_DSL = /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
TEX_DSL = /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl
.sgml.html:
rm -rf $@
mkdir $@
sed 's/graphic fileref="[^"]*/&.png/' $< > temp.sgml
(set -e; cd $@ && jade -t sgml -d $(HTML_DSL) ../temp.sgml && \
ln -s book1.html index.html) || rm -rf $@
rm -f temp.sgml
.sgml.ps:
sed 's/graphic fileref="[^"]*/&.ps/' sag.sgml > temp.sgml
jade -t tex -d $(TEX_DSL) temp.sgml
jadetex temp.tex
jadetex temp.tex
jadetex temp.tex
dvips -o temp.ps temp.dvi
rm -f temp.aux temp.log temp.dvi temp.tex temp.sgml
mv temp.ps $*.ps
.fig.png:
fig2dev -Lpng $< $@
.fig.ps:
fig2dev -Lps -m0.75 $< $@
rename s/.ps/.eps/g *.ps
.SUFFIXES: $(SUFFIXES) .sgml .html .tex .ps .dvi .png .fig
docsps = $(docs:.sgml=.ps)
docshtml = $(docs:.sgml=.html)
docstex = $(docs:.sgml=.tex) $(docs:.sgml=.log) $(docs:.sgml=.dvi) \
$(docs:.sgml=.aux)
pngs = $(figs:.fig=.png)
psfigs = $(figs:.fig=.ps)
all: html ps
html: $(pngs) $(docshtml)
for dir in $(docshtml); do cp $(pngs) $$dir/.; done
ps: $(psfigs) $(docsps)
sag-png.sgml: sag.sgml
sed 's/graphic fileref="[^"]*/&.png/' sag.sgml > sag-png.sgml
sag-ps.sgml: sag.sgml
sed 's/graphic fileref="[^"]*/&.ps/' sag.sgml > sag-ps.sgml
clean:
rm -rf $(docsps) $(docshtml) $(docstex) $(pngs) $(psfigs) *.eps
|