# Run.notes
#
# Compile the release notes for the COHERENT system
#
TROFF="troff -p -Z6 -rRN1 -rNS1 -rNI1"
OUTPUT=/tmp/doc/rel.notes
V=/v/doc/coherent

rm $OUTPUT/*

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

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

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

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

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

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

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

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

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

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

#$TROFF -mcohtext $V/fonts.r pgn.r $V/top.r \
#	lexicon.r \
#	2>>notes.x > $OUTPUT/lexicon.p
#tail -1 notes.x >pgn.r
#
#$TROFF -mcohlex $V/fonts.r pgn.r $V/top.r \
#	`cat Files.relnotes` \
#	2>>notes.x >> $OUTPUT/lexicon.p

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

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