docs/master

annotate makefile @ 202:e417f510aaca

Reworked the MH example session.
author markus schnalke <meillo@marmaro.de>
date Thu, 12 Jul 2012 09:04:13 +0200
parents 05a243dffaca
children 95257474a123
rev   line source
meillo@0 1 NAME = thesis
meillo@174 2 CHAPS = style front.roff dedication.roff toc.roff \
meillo@184 3 preface.roff intro.roff discussion.roff summary.roff tools.roff \
meillo@198 4 refs.roff rfcs.roff official.roff colophon.roff
meillo@197 5 BIB = bib *.bib
meillo@0 6 PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress
meillo@197 7 REFER = refer -n -p bib -p mail.bib -p web.bib -e -P -sLAD -l,2 -k
meillo@0 8
meillo@0 9 all: $(NAME).ps
meillo@0 10
meillo@197 11 $(NAME).ps: $(CHAPS) makefile $(BIB) toc.ig refs.ig
meillo@150 12 export TROFFONTS=fonts;\
meillo@150 13 soelim $(CHAPS) | $(REFER) | \
meillo@184 14 tbl | grap | pic | troff -Tps -ms 2>err.ig | dpost >$@
meillo@79 15
meillo@79 16 err.ig: $(CHAPS)
meillo@150 17 export TROFFONTS=fonts;\
meillo@150 18 soelim $(CHAPS) | $(REFER) | \
meillo@184 19 tbl | grap | pic | troff -Tps -ms -rZ1 -z 2>$@
meillo@79 20
meillo@79 21 toc.ig: err.ig
meillo@113 22 sed -n '/^TOC____/s///p' err.ig >$@
meillo@0 23
meillo@156 24 refs.ig: err.ig
meillo@156 25 mkdir -p refs
meillo@176 26 awk -F '\t' '/^REF____/{ \
meillo@151 27 sub(/^REF____/,""); \
meillo@151 28 printf $$2 >"refs/"$$1; close("refs/$$1"); \
meillo@151 29 printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
meillo@151 30 }' err.ig
meillo@151 31
meillo@0 32 pdf: $(NAME).pdf
meillo@0 33 $(NAME).pdf: $(NAME).ps
meillo@115 34 ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
meillo@0 35
meillo@0 36 book: book.pdf
meillo@0 37 book.pdf: book.ps
meillo@115 38 ps2pdf $(PDFFLAGS) book.ps 2>/dev/null
meillo@0 39 book.ps: $(NAME).ps
meillo@0 40 psbook -s16 $(NAME).ps | psnup -2 -m2mm >$@
meillo@0 41
meillo@0 42 clean:
meillo@0 43 rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
meillo@156 44 rm -rf refs
meillo@79 45 rm -f *.ig
meillo@111 46
meillo@111 47 spell:
meillo@121 48 sort -u -o terms terms
meillo@111 49 spell +terms *.roff | egrep -v '[0-9a-f]{40}'