# $Cambridge: hermes/doc/talks/2006-11-techlinks/Makefile,v 1.2 2006/11/23 17:36:16 fanf2 Exp $ MSSRC = paper.ms TBLSRC = PICSRC = TXTSRC = TXTMS = ${TXTSRC:.txt=.ms} MSPS = ${MSSRC:.ms=.ps} MSHTML = ${MSSRC:.ms=.html} PICPS = ${PICSRC:.pic=.ps} TBLPS = ${TBLSRC:.tbl=.ps} PS = ${MSPS} ${PICPS} ${TBLPS} EPS = ${PS:.ps=.eps} PDF = ${PS:.ps=.pdf} all: ${PS} ${PDF} ${MSHTML} clean: rm -rf slides slides.html paper.html ${COPIES} rm -f .gscache.* mgp* grohtml* munghtml.pl rm -f *.ps *.pdf *.eps *.epsi ex*.?s ${TXTSRC} ${TXTMS} # dependencies paper.ps paper.html: paper.ms \ ${TBLSRC} ${PICSRC} ${TXTMS} # excessively complicated eps construction .SUFFIXES: .pic .tbl .ms .ps .pdf .eps .epsi .html .txt .txt.ms: perl -ne 's/\\/\\\\/g; \ my $$dot = $$. % 2 ? sprintf "%04d", $$. \ : "\\0\\0\\0\\0"; \ printf "\\f[R]\\s[\\n[listnum]]%s \\s[\\n[listtxt]]\\f[CR] %s",\ $$dot, $$_' $< > $@ .ms.ps: groff -Tps -dpaper=a4 -P-pa4 -ms -sptR $< > $@ .ms.html: groff -Thtml -ms -sptR $< > $@ sed 's|||g' < $@ > $@.big mv $@.big $@ .pic.ps: groff -Tps -p $< > $@ .tbl.ps: groff -Tps -t $< > $@ .ps.pdf: ps2pdf $< $@ .ps.epsi: ps2epsi $< $@ # this hack isn't strictly necessary, but makes smaller .eps files .epsi.eps: sed -e '/^% /d;/^%%[A-Z][a-z]*Preview/d' $< > $@ # EOF