:
# Make all games
#
# :makeall [-e]
#	to make all games underneath this directory
#
# :makeall [-e] install
#	to install all games underneath this directory
#

NOTDONEYET=""
DIRS=".  parsedate atc backgammon battlestar canfield cribbage fortune \
      hangman snake mille monop moon nethack3.0 phantasia quiz robots2 \
      rogue trek sail"
ERRORS=''

for i in $DIRS
do
    (cd $i && echo "WORKING ON: $i" && make ${1+"$@"})
    if [ "$?" != 0 ]
    then
	ERRORS="$ERRORS $i"
    fi
done

if [ "x$ERRORS" != "x" ]
then
    echo "Errors were made in: $ERRORS"
    exit 1
fi

exit 0
