# Run.notes
#
# Compile the release notes for the COHERENT system
#
TROFF="troff -p -rRN1"
OUTPUT=/tmp/doc

# do the title page and table of contents
$TROFF ../fonts.r title.r 2>/dev/null >$OUTPUT/title.p
$TROFF ../fonts.r top.r copyright.r >$OUTPUT/copyright.p

# do each chapter in turn
$TROFF -mcohtext ../fonts.r top.r \
	intro.r \
	2>notes.x > $OUTPUT/intro.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	hardware.r \
	2>>notes.x > $OUTPUT/hardware.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	install.r \
	2>>notes.x > $OUTPUT/install.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	update.r \
	2>>notes.x > $OUTPUT/update.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	bbs.r \
	2>>notes.x > $OUTPUT/bbs.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	usergroup.r \
	2>>notes.x > $OUTPUT/usergroup.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	lexicon.r \
	2>>notes.x > $OUTPUT/lexicon.p
tail -1 notes.x >pgn.r

$TROFF -mcohlex ../fonts.r pgn.r top.r \
	`cat Files.relnotes` \
	2>>notes.x >> $OUTPUT/lexicon.p
egrep -y 'cannot' notes.x
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	errata.r \
	2>>notes.x > $OUTPUT/errata.p
tail -1 notes.x >pgn.r

$TROFF -mcohtext ../fonts.r pgn.r top.r \
	thirdparty.r \
	2>>notes.x > $OUTPUT/thirdparty.p

# compile the table of contents and the index
../bin/contents <notes.x >/tmp/contents.r
$TROFF -mcohcon ../fonts.r top.r \
	/tmp/contents.r > $OUTPUT/rel.con.p

$TROFF ../fonts.r order.r \
	2>>notes.x > $OUTPUT/order.p
