#!/bin/sh
BADPLUGINS=""

os=`uname`
case "$os" in
 Darwin)
 	MAKEFLAG="-f Makefile.darwin"
	;;
  *)
  	MAKEFLAG=""
	;;
esac

for i in *;
do if [ -d $i -a $i != CVS ]; then
 if [ "$i" != "3com_hub" ];
 then
 cd $i
 ${MAKE:-make} $MAKEFLAG $1
 if [ $? -ne 0 ];then
   BADPLUGINS="$BADPLUGINS $i"
 fi
 cd ..
 fi
fi
done

if test -n "$BADPLUGINS"; then
 echo "Warning : the following plugins could not be built : "
 echo $BADPLUGINS
 exit 0
fi
