x = csug latex = pdflatex stexmacrofiles = tspl4-prep bib = $(x).bib index=yes installdir=/u/dyb/crs/www/csug9 TSPL=tspl4 DIR=$(shell basename `pwd`) target: logcheck1 logcheck2 checklibs $(x).html install: target installsh -m 2755 -d $(installdir) installsh -m 0644 --ifdiff *.html *.css $(installdir) installsh -m 2755 -d $(installdir)/canned installsh -m 0644 --ifdiff canned/* $(installdir)/canned installsh -m 2755 -d $(installdir)/gifs installsh -m 0644 --ifdiff gifs/*.gif $(installdir)/gifs installsh -m 2755 -d $(installdir)/$(mathdir) installsh -m 0644 --ifdiff $(mathdir)/*.gif $(installdir)/$(mathdir) (cd $(installdir); ln -s -f $(x).html index.html) # thrice is not enough when starting from scratch logcheck1: $(x).thirdrun @if [ -n "`grep 'Warning: Label(s) may have changed' $(x).log`" ] ; then\ /bin/rm -f $(x).thirdrun ;\ $(MAKE) $(x).thirdrun;\ fi rerun: $(x).thirdrun logcheck2: $(x).thirdrun @if [ -n "`grep Warning $(x).log | grep -v pdftex.map`" ] ; then\ echo "`grep Warning $(x).log | grep -v pdftex.map`";\ false;\ fi @if [ -n "`grep Overfull $(x).log | grep -v pdftex.map`" ] ; then\ echo "`grep Overfull $(x).log | grep -v pdftex.map`";\ false;\ fi include ~/stex/Mf-stex # HACK to prevent lines from dropping below .5pt # .5pt = 1/144in = 8.3 1200ths, so go for 10 1200ths .fig.pdf: fig2dev -Leps $*.fig > $*.eps\ && grep -q '7.500 slw' $*.eps\ && sed -e 's/7.500 slw/10.000 slw/' $*.eps | epstopdf --filter > $*.pdf\ && /bin/rm $*.eps || (echo "CHECK GREP"; false) stexsrc = csug.stex title.stex copyright.stex contents.stex\ preface.stex intro.stex use.stex expeditor.stex debug.stex foreign.stex\ binding.stex control.stex objects.stex numeric.stex io.stex\ libraries.stex syntax.stex system.stex smgmt.stex threads.stex\ compat.stex bibliography.stex summary.stex texsrc = ${stexsrc:%.stex=%.tex} title.tex contents.tex bibliography.tex: /bin/rm -f $*.tex echo "%%% DO NOT EDIT THIS FILE" > $*.tex echo "%%% Edit the .stex version instead" >> $*.tex echo "" >> $*.tex cat $*.stex >> $*.tex chmod -w $*.tex title.tex: title.stex contents.tex: contents.stex bibliography.tex: bibliography.stex $(x).firstrun: $(x).prefirstrun $(x).prefirstrun: tspl.aux tspl.rfm tspl.idx touch $x.sfm cat tspl.aux > $x.aux cat tspl.rfm > $x.rfm cat tspl.idx > $x.idx touch $(x).prefirstrun $(x).secondrun: $(x).presecondrun $(x).presecondrun: $(x).firstrun cat tspl.aux >> $x.aux cat tspl.rfm >> $x.rfm echo '(summary-make "$x")' | scheme setup.ss summary.ss cat tspl.idx >> $x.idx touch $(x).presecondrun $(x).thirdrun: $(x).prethirdrun canned/cisco-logo.png $(x).prethirdrun: $(x).secondrun cat tspl.aux >> $x.aux cat tspl.rfm >> $x.rfm echo '(summary-make "$x")' | scheme setup.ss summary.ss cat tspl.idx >> $x.idx touch $(x).prethirdrun $(x).hfirstrun: $(x).hprefirstrun csug8.hcls $(x).hprefirstrun: $(x).thirdrun tspl.haux in.hidx cat tspl.aux >> $x.aux cat tspl.rfm >> $x.rfm cat tspl.idx >> $x.idx cat tspl.haux > $x.haux touch $(x).hprefirstrun $(x).hsecondrun: $(x).hpresecondrun $(x).hpresecondrun: $(x).hfirstrun cat tspl.haux >> $x.haux touch $(x).hpresecondrun $(x).hthirdrun: $(x).hprethirdrun $(x).hprethirdrun: $(x).hsecondrun cat tspl.haux >> $x.haux touch $(x).hprethirdrun $(x).prefirstrun: $(texsrc) csug8.cls csug810.clo $(x).firstrun: scheme.sty tspl.aux: ${TSPL}/tspl.aux cat ${TSPL}/*.aux | grep '\\newlabel' | \ sed -e 's/\\newlabel{\(.*\){\([^}]*\)}}/\\newlabel{TSPL:\1{t\2}}/' > tspl.aux tspl.haux: ${TSPL}/tspl.haux sed -e 's/(putprop (quote /(putprop (quote |TSPL|:/' ${TSPL}/tspl.haux | \ sed -e 's;url) ";url) "${TSPL}/;' > tspl.haux tspl.rfm: ${TSPL}/tspl.rfm sed -e 's/\\pageref{/\\pageref{TSPL:/' ${TSPL}/tspl.rfm > tspl.rfm # this version leaves tspl entries out of the printed index #tspl.idx: # echo -n > tspl.idx # this version includes tspl entries in the printed index tspl.idx: ${TSPL}/tspl.idx sed -e 's/{\([1-9][0-9]*\)}$$/{t\1}/' ${TSPL}/tspl.idx | \ sed -e 's/{\([ivx][ivx]*\)}$$/{t\1}/' > tspl.idx in.hidx: ${TSPL}/out.hidx sed -e 's;"\(.*\)\.html#;"${TSPL}/\1.html#;' ${TSPL}/out.hidx | \ sed -e 's/"")$$/"t")/' > in.hidx $(texsrc): tspl4-prep.stex priminfo.ss ../s/primdata.ss checklibs: $(x).thirdrun sort libsrecorded | uniq > libsrecorded.sort sort libslisted | uniq > libslisted.sort diff libsrecorded.sort libslisted.sort code: $(stexsrc) extract.pl $(stexsrc) > code echo '(load "code" pretty-print)' | vscheme csv7.5 -q $(x).clean: -/bin/rm -f $(x).rfm $(x).sfm $(x).prefirstrun $(x).presecondrun\ $(x).prethirdrun $(x).ans\ $(x).hprefirstrun $(x).hpresecondrun $(x).hprethirdrun\ tspl.aux tspl.haux tspl.rfm tspl.idx in.hidx\ libsrecorded{,.sort} libslisted{,.sort}\ code $(x).reallyclean: $(x).reallyreallyclean: