#!/bin/sh

cd $JETTY_HOME/src
DOCDIR=$JETTY_HOME/javadoc
export DOCDIR
mkdir -p $DOCDIR
SRCDIRS=
PACKAGES=
S=
DIRS=`find com -type d -print`
for DIR in $DIRS
do
    LC=`ls $DIR/*.java 2>/dev/null | wc -l`
    [ $LC -gt 0 ] && SRCDIRS="$SRCDIRS$S$DIR" && PACKAGES="$PACKAGES $DIR" && S=':'
done

PACKAGES=`echo $PACKAGES | tr / .`

javadoc -d $DOCDIR -version -author -protected $PACKAGES

