3 all: $(SOURCE).pdf $(SOURCE).txt $(SOURCE).html
5 PNG_FIGS = $(wildcard *.png)
6 PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
9 convert $< -density 150 $@
11 %.pdf: %.texinfo $(PDF_FIGS)
16 makeinfo --no-headers --force -o $@ $<
19 makeinfo --html --no-split $< -o $@
21 # Fix texinfo HTML output
22 # perl -w -n -e 'if (/<div class="contents">/) {$$toc=1}' \
23 # -e 'if (!$$toc) { s/class="toc"//}' \
24 # -e '@match=/\[ ([^ ]+) \]/; if (@match > 0 && -r $$match[0] . ".png") { s/\[ ([^ ]+) \]/<img src="$$1.png"><\/img>/ }' \
25 # -e 'print;' < $@ > $@.tmp
29 rm -f $(SOURCE).{aux,cp,cps,fn,ky,log,pg,toc,tp,vr,vrs} $(PDF_FIGS)
33 web: $(WWW) $(addprefix $(WWW)/,index.html $(SOURCE).html $(wildcard *.png) $(SOURCE).pdf)
38 $(WWW)/index.html: index.html
39 sed -e "s/<!-- @LAST_MODIFIED@ -->/`LC_TIME=C TZ= date`/" < $< > $@