docs/bib-ref1
annotate 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 |
rev | line source |
---|---|
meillo@0 | 1 NAME = ref1 |
meillo@0 | 2 CHAPS = style front.roff toc.roff text.roff refs.roff |
meillo@0 | 3 BIB = bib |
meillo@0 | 4 PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress |
meillo@0 | 5 REFER = refer -n -p bib -e -P -sLAD -l,2 -k |
meillo@0 | 6 |
meillo@0 | 7 all: $(NAME).ps |
meillo@0 | 8 |
meillo@0 | 9 $(NAME).ps: $(CHAPS) makefile $(BIB) toc.ig refs.ig |
meillo@0 | 10 export TROFFONTS=fonts;\ |
meillo@0 | 11 soelim $(CHAPS) | $(REFER) | \ |
meillo@0 | 12 tbl | grap | pic | \ |
meillo@0 | 13 troff -Tps -ms -mpictures 2>err.ig | dpost >$@ |
meillo@0 | 14 |
meillo@0 | 15 err.ig: $(CHAPS) |
meillo@0 | 16 export TROFFONTS=fonts;\ |
meillo@0 | 17 soelim $(CHAPS) | $(REFER) | \ |
meillo@0 | 18 tbl | grap | pic | \ |
meillo@0 | 19 troff -Tps -ms -mpictures -rZ1 -z 2>$@ |
meillo@0 | 20 |
meillo@0 | 21 toc.ig: err.ig |
meillo@0 | 22 sed -n '/^TOC____/s///p' err.ig >$@ |
meillo@0 | 23 |
meillo@0 | 24 refs.ig: err.ig |
meillo@0 | 25 mkdir -p refs |
meillo@0 | 26 awk -F '\t' '/^REF____/{ \ |
meillo@0 | 27 sub(/^REF____/,""); \ |
meillo@0 | 28 printf $$2 >"refs/"$$1; close("refs/$$1"); \ |
meillo@0 | 29 printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\ |
meillo@0 | 30 }' err.ig |
meillo@0 | 31 |
meillo@0 | 32 pdf: $(NAME).pdf |
meillo@0 | 33 $(NAME).pdf: $(NAME).ps |
meillo@0 | 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@0 | 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@0 | 44 rm -rf refs |
meillo@0 | 45 rm -f *.ig |