docs/master

view makefile @ 169:f4ffe121a0a2

Applied excellent suggestions and corrections by Kate.
author markus schnalke <meillo@marmaro.de>
date Tue, 10 Jul 2012 13:08:51 +0200
parents db199d51d5b0
children 35fc40a5011d
line source
1 NAME = thesis
2 CHAPS = style front.roff dedication.roff abstract.roff toc.roff \
3 preface.roff intro.roff discussion.roff summary.roff refs.roff \
4 official.roff colophon.roff
5 PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress
6 REFER = refer -n -p bib -p rfcs -e -P -sLAD -l,2 -k
8 all: $(NAME).ps
10 $(NAME).ps: $(CHAPS) makefile bib rfcs toc.ig refs.ig
11 export TROFFONTS=fonts;\
12 soelim $(CHAPS) | $(REFER) | \
13 grap | pic | troff -Tps -ms 2>err.ig | dpost >$@
15 err.ig: $(CHAPS)
16 export TROFFONTS=fonts;\
17 soelim $(CHAPS) | $(REFER) | \
18 grap | pic | troff -Tps -ms -rZ1 -z 2>$@
20 toc.ig: err.ig
21 sed -n '/^TOC____/s///p' err.ig >$@
23 refs.ig: err.ig
24 mkdir -p refs
25 awk '/^REF____/{ \
26 sub(/^REF____/,""); \
27 printf $$2 >"refs/"$$1; close("refs/$$1"); \
28 printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
29 }' err.ig
31 pdf: $(NAME).pdf
32 $(NAME).pdf: $(NAME).ps
33 ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
35 book: book.pdf
36 book.pdf: book.ps
37 ps2pdf $(PDFFLAGS) book.ps 2>/dev/null
38 book.ps: $(NAME).ps
39 psbook -s16 $(NAME).ps | psnup -2 -m2mm >$@
41 clean:
42 rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
43 rm -rf refs
44 rm -f *.ig
46 spell:
47 sort -u -o terms terms
48 spell +terms *.roff | egrep -v '[0-9a-f]{40}'