docs/bib-ref1

view makefile @ 0:c264ce6f5b83

let's start with that
author markus schnalke <meillo@marmaro.de>
date Wed, 13 Nov 2013 08:15:58 +0100
parents
children deedec7f31eb
line source
1 NAME = ref1
2 CHAPS = style front.roff toc.roff text.roff refs.roff
3 BIB = bib
4 PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress
5 REFER = refer -n -p bib -e -P -sLAD -l,2 -k
7 all: $(NAME).ps
9 $(NAME).ps: $(CHAPS) makefile $(BIB) toc.ig refs.ig
10 export TROFFONTS=fonts;\
11 soelim $(CHAPS) | $(REFER) | \
12 tbl | grap | pic | \
13 troff -Tps -ms -mpictures 2>err.ig | dpost >$@
15 err.ig: $(CHAPS)
16 export TROFFONTS=fonts;\
17 soelim $(CHAPS) | $(REFER) | \
18 tbl | grap | pic | \
19 troff -Tps -ms -mpictures -rZ1 -z 2>$@
21 toc.ig: err.ig
22 sed -n '/^TOC____/s///p' err.ig >$@
24 refs.ig: err.ig
25 mkdir -p refs
26 awk -F '\t' '/^REF____/{ \
27 sub(/^REF____/,""); \
28 printf $$2 >"refs/"$$1; close("refs/$$1"); \
29 printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
30 }' err.ig
32 pdf: $(NAME).pdf
33 $(NAME).pdf: $(NAME).ps
34 ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
36 book: book.pdf
37 book.pdf: book.ps
38 ps2pdf $(PDFFLAGS) book.ps 2>/dev/null
39 book.ps: $(NAME).ps
40 psbook -s16 $(NAME).ps | psnup -2 -m2mm >$@
42 clean:
43 rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
44 rm -rf refs
45 rm -f *.ig