define make_dirs
							\
no_errors=0 ; 						\
							\
handle_error () 					\
{							\
  echo ""; echo "ERROR: Found error in $$1"; echo "" ;	\
  printf "\7" ;						\
  no_errors=`echo $$no_errors+1 | bc` ;			\
  err_modules="$$err_modules $$1" ;			\
} ; 							\
							\
for module in `ls -dF ?? | grep / | cut -f1 -d/` ; 	\
do 							\
  cd $$module ; 					\
  $(MAKE) || handle_error $$module ;			\
  cd .. ; 						\
done ;							\
							\
if [ $$no_errors != "0" ]; then				\
  printf "There were errors in the following modules:   \
  \n\t$$err_modules\n" ; 				\
else							\
  echo ""; echo "Finished with no errors." ;		\
fi							\

endef



define clean_dirs
							\
for module in `ls -dF ?? | grep / | cut -f1 -d/` ;      \
do                                                      \
  cd $$module ;                                         \
  $(MAKE) clean;                                        \
  cd .. ;                                               \
done                                                    \

endef
