:

mkdir /usr/man/COHERENT/MLP; chmog 755 bin bin /usr/man/COHERENT/MLP


cp tmac.brett /usr/lib

List=`ls -r *.r`


for Next in $List
do
   NewName=`echo $Next | awk -F. '{print $1}'`
   echo "$NewName"

   LIST=""
   for Next1 in $List
   do
      LIST="`echo $Next1 | 
         awk -F. '{if ("'$NewName'" != $1) {printf "%s, ", $1}}'`$LIST"
   done

   LIST=`echo "$LIST" | awk '{printf "%s", substr($0,1,(length($0)-2))}'`
   echo ".br\nSee Also\n.br\n.B \"$LIST\"\n" >/tmp/$$


   cat $Next /tmp/$$ | nroff -mbrett -x >/usr/man/COHERENT/MLP/$NewName

   echo "COHERENT/MLP/$NewName $NewName" >>/usr/man/man.index
done


echo "Updating index"
sort -u </usr/man/man.index >/tmp/$$
cat /tmp/$$ >/usr/man/man.index

rm /tmp/$$
