# Run.conindex.
# Build the table of contents and the index for the COHERENT manual.
# by fwb, 6/91
#
# copyright (c) 1991-1993 by Mark Williams Company, Northbrook Ill.

OUTPUT=/tmp/doc
INPUT=/v/doc/coherent

>coh.x
for i in \
	intro \
	using \
	sh \
	emacs \
	ed \
	sed \
	c_language \
	awk \
	lex \
	yacc \
	bc \
	m4 \
	make \
	nroff \
	uucp \
	lexicon \
	_ \
	a \
	b \
	c \
	d \
	e \
	f \
	g \
	h \
	i \
	j \
	k \
	l \
	m \
	n \
	o \
	p \
	q \
	r \
	s \
	t \
	u \
	v \
	w \
	x \
	y \
	z
	do
		cat $OUTPUT/$i.x >>coh.x
	done

# create the index
index <coh.x >index.r
tail -1 coh.x >pgn.r
troff -p -Z2 -mcohindex pgn.r fonts.r top.r index.r 2>>coh.x >$OUTPUT/index.p

# create the table of contents
contents <coh.x >contents.r
troff -p -Z2 -mcohcon fonts.r top.r contents.r 2>>coh.x >$OUTPUT/contents.p
