4 # Simple script to repopulate the 'doc' tree from
5 # the mdoc man pages stored in each project.
8 # Remove existing manpages from the doc tree
13 # Build Makefile in 'man' directory
16 echo "default: all" >>Makefile
19 for d in libarchive tar cpio; do
20 for f in ../../$d/*.[135]; do
22 echo `basename $f`: ../mdoc2man.awk $f >> Makefile
23 echo " awk -f ../mdoc2man.awk < $f > `basename $f`" >> Makefile
24 all="$all `basename $f`"
30 # Rebuild Makefile in 'text' directory
33 echo "$all" >>Makefile
35 for d in libarchive tar cpio; do
36 for f in ../../$d/*.[135]; do
38 echo `basename $f`: $f >> Makefile
39 echo " nroff -mdoc $f | col -b > `basename $f`" >> Makefile
44 # Convert all of the manpages to -man format.
46 # Format all of the manpages to text