+ test -f $i/test-passed && rm $i/test-passed
+ # hack to get exit codes right.
+ if $GNUMAKE -C $i test 2>&1 && touch $i/test-passed ; then
+ :
+ else
+ exit $?
+ fi | tee output/building-contrib.`basename $i`
+done
+
+# Sometimes people used to see the "No tests failed." output from the last
+# DEFTEST in contrib self-tests and think that's all that is. So...
+HEADER_HAS_BEEN_PRINTED=false
+for dir in contrib/*
+do
+ if [ -d "$dir" -a -f "$dir/Makefile" -a ! -f "$dir/test-passed" ]; then
+ if $HEADER_HAS_BEEN_PRINTED; then
+ echo > /dev/null
+ else
+ cat <<EOF
+
+WARNING! Some of the contrib modules did not build successfully or pass
+their self-tests. Failed contribs:"
+EOF
+ HEADER_HAS_BEEN_PRINTED=true
+ fi
+ echo " `basename $dir`"
+ fi