#!/bin/sh

# Assume call with pwd = 'doc'.

# Phase I ... List known manpages ...

rm -f ../tools/rules/manpages
touch ../tools/rules/manpages

for i in `ls *.man`
do
	echo $i '-->' manpages
	../tools/expand -rules ../tools/rules/manpage.list $i  >> ../tools/rules/manpages
done

# Phase II .. Generate true output ...

for i in `ls *.man`
do
	echo $i '-->' `basename $i .man`.n
	../tools/expand -rules ../tools/rules/manpage.nroff $i > `basename $i .man`.n
done
