docs/master

view makefile @ 154:63e885fb48ba

Converted some internal references to the new macros.
author markus schnalke <meillo@marmaro.de>
date Fri, 06 Jul 2012 15:59:04 +0200
parents 472aa79f9b6f
children db199d51d5b0
line source
1 NAME = thesis
2 CHAPS = style front.roff dedication.roff abstract.roff toc.roff \
3 preface.roff intro.roff discussion.roff future.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
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: err.ig
24 awk '/^REF____/{ \
25 sub(/^REF____/,""); \
26 printf $$2 >"refs/"$$1; close("refs/$$1"); \
27 printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
28 }' err.ig
30 pdf: $(NAME).pdf
31 $(NAME).pdf: $(NAME).ps
32 ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
34 book: book.pdf
35 book.pdf: book.ps
36 ps2pdf $(PDFFLAGS) book.ps 2>/dev/null
37 book.ps: $(NAME).ps
38 psbook -s16 $(NAME).ps | psnup -2 -m2mm >$@
40 clean:
41 rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
42 rm -f refs/*
43 rm -f *.ig
45 spell:
46 sort -u -o terms terms
47 spell +terms *.roff | egrep -v '[0-9a-f]{40}'