docs/bib-ref1

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/makefile	Wed Nov 13 08:15:58 2013 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +NAME = ref1
     1.5 +CHAPS = style front.roff toc.roff text.roff refs.roff
     1.6 +BIB = bib
     1.7 +PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress
     1.8 +REFER = refer -n -p bib -e -P -sLAD -l,2 -k
     1.9 +
    1.10 +all: $(NAME).ps
    1.11 +
    1.12 +$(NAME).ps: $(CHAPS) makefile $(BIB) toc.ig refs.ig
    1.13 +	export TROFFONTS=fonts;\
    1.14 +	soelim $(CHAPS) | $(REFER) | \
    1.15 +		tbl | grap | pic | \
    1.16 +		troff -Tps -ms -mpictures 2>err.ig | dpost >$@
    1.17 +
    1.18 +err.ig: $(CHAPS)
    1.19 +	export TROFFONTS=fonts;\
    1.20 +	soelim $(CHAPS) | $(REFER) | \
    1.21 +		tbl | grap | pic | \
    1.22 +		troff -Tps -ms -mpictures -rZ1 -z 2>$@
    1.23 +
    1.24 +toc.ig: err.ig
    1.25 +	sed -n '/^TOC____/s///p' err.ig >$@
    1.26 +
    1.27 +refs.ig: err.ig
    1.28 +	mkdir -p refs
    1.29 +	awk -F '\t' '/^REF____/{ \
    1.30 +		sub(/^REF____/,""); \
    1.31 +		printf $$2 >"refs/"$$1; close("refs/$$1"); \
    1.32 +		printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
    1.33 +	}' err.ig
    1.34 +
    1.35 +pdf: $(NAME).pdf
    1.36 +$(NAME).pdf: $(NAME).ps
    1.37 +	ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
    1.38 +
    1.39 +book: book.pdf
    1.40 +book.pdf: book.ps
    1.41 +	ps2pdf $(PDFFLAGS) book.ps 2>/dev/null
    1.42 +book.ps: $(NAME).ps
    1.43 +	psbook -s16 $(NAME).ps | psnup -2 -m2mm >$@
    1.44 +
    1.45 +clean:
    1.46 +	rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
    1.47 +	rm -rf refs
    1.48 +	rm -f *.ig