docs/bib-ref2

diff makefile @ 0:debf9b807f5f

initial commit
author markus schnalke <meillo@marmaro.de>
date Thu, 13 Feb 2014 20:28:19 +0100
parents
children 8578a6d4ed94
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/makefile	Thu Feb 13 20:28:19 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +NAME = ref2
     1.5 +CHAPS = style front.roff toc.roff text.roff refs.roff cc0.roff #decl.roff
     1.6 +BIB = bib
     1.7 +PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress
     1.8 +REFER = refer -n -p bib -e -P -sLAD -a # -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 +		troff -Tps -ms 2>err.ig | dpost >$@
    1.16 +
    1.17 +err.ig: $(CHAPS)
    1.18 +	export TROFFONTS=fonts;\
    1.19 +	soelim $(CHAPS) | $(REFER) | \
    1.20 +		troff -Tps -ms -rZ1 -z 2>$@
    1.21 +
    1.22 +toc.ig: err.ig
    1.23 +	sed -n '/^TOC____/s///p' err.ig >$@
    1.24 +
    1.25 +refs.ig: err.ig
    1.26 +	mkdir -p refs
    1.27 +	awk -F '\t' '/^REF____/{ \
    1.28 +		sub(/^REF____/,""); \
    1.29 +		printf $$2 >"refs/"$$1; close("refs/$$1"); \
    1.30 +		printf $$3 >"refs/"$$1".page"; close("refs/$$1.page");\
    1.31 +	}' err.ig
    1.32 +
    1.33 +pdf: $(NAME).pdf
    1.34 +$(NAME).pdf: $(NAME).ps
    1.35 +	ps2pdf $(PDFFLAGS) $(NAME).ps 2>/dev/null
    1.36 +
    1.37 +book: book.pdf
    1.38 +book.pdf: book.ps
    1.39 +	ps2pdf $(PDFFLAGS) book.ps 2>/dev/null
    1.40 +book.ps: $(NAME).ps
    1.41 +	psbook -s16 $(NAME).ps | psnup -2 -m2mm >$@
    1.42 +
    1.43 +clean:
    1.44 +	rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
    1.45 +	rm -rf refs
    1.46 +	rm -f *.ig