docs/master

diff makefile @ 79:f3c95ee96cc4

Moved TOC from end to beginning; extended makefile. The TOC generation concept and idea was inspired by the book ``UNIX Text Processing''.
author markus schnalke <meillo@marmaro.de>
date Wed, 06 Jun 2012 10:56:14 +0200
parents 3e70450336a4
children e6f95015ba61
line diff
     1.1 --- a/makefile	Tue Jun 05 22:24:10 2012 +0200
     1.2 +++ b/makefile	Wed Jun 06 10:56:14 2012 +0200
     1.3 @@ -1,13 +1,23 @@
     1.4  NAME = thesis
     1.5 -CHAPS = style front.roff dedication.roff abstract.roff preface.roff \
     1.6 -	ch*.roff refs.roff toc.roff
     1.7 +CHAPS = style front.roff dedication.roff abstract.roff toc.roff \
     1.8 +	preface.roff ch*.roff refs.roff
     1.9  PDFFLAGS = -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress
    1.10  
    1.11  all: $(NAME).ps
    1.12  
    1.13  $(NAME).ps: $(CHAPS) makefile bib
    1.14  	export TROFFONTS=fonts REFER=bib;\
    1.15 -	cat $(CHAPS) | refer -e -P -sLAD -l,2 -k | troff -Tps -ms | dpost >$@
    1.16 +	cat $(CHAPS) | refer -e -P -sLAD -l,2 -k | \
    1.17 +		troff -Tps -ms 2>err.ig | dpost >$@
    1.18 +
    1.19 +err.ig: $(CHAPS)
    1.20 +	export TROFFONTS=fonts REFER=bib;\
    1.21 +	cat $(CHAPS) | refer -e -P -sLAD -l,2 -k | \
    1.22 +		troff -Tps -ms -rZ1 -z 2>$@
    1.23 +
    1.24 +toc.roff: toc.ig
    1.25 +toc.ig: err.ig
    1.26 +	sed -n '/^TOC____/s///p' $< >$@
    1.27  
    1.28  pdf: $(NAME).pdf
    1.29  $(NAME).pdf: $(NAME).ps
    1.30 @@ -21,4 +31,4 @@
    1.31  
    1.32  clean:
    1.33  	rm -f $(NAME).ps $(NAME).pdf book.ps book.pdf
    1.34 -	rm -f bib.ig
    1.35 +	rm -f *.ig