--- Makefile.orig Tue Jul 23 18:57:50 2002 +++ Makefile Fri Jul 25 14:24:25 2003 @@ -370,3 +370,27 @@ # ----------------------------------------------------------------------------- +COMPILE_EXP=haddock.compile.expected +RUNTIME_EXP=haddock.generated.expected +COMPILE_OUT=haddock.compile.actual +RUNTIME_OUT=haddock.generated.actual + +check:: + @( cd haddock/examples/ ; ${MAKE} > ../../${COMPILE_OUT}.raw 2>&1 ) + @cat haddock/examples/*.html > ${RUNTIME_OUT} + @( sed '1d;$$d' ${COMPILE_OUT}.raw > ${COMPILE_OUT} ) + @(if ( cmp -s ${COMPILE_EXP} ${COMPILE_OUT} && \ + cmp -s ${RUNTIME_EXP} ${RUNTIME_OUT} ) ; then \ + echo ;\ + echo "All is good!" ; \ + echo ;\ + else \ + echo ;\ + echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\ + echo "Unexpected regress results!" ;\ + echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\ + echo ;\ + echo "here is a diff:" ;\ + diff -u ${COMPILE_EXP} ${COMPILE_OUT} ;\ + diff -u ${RUNTIME_EXP} ${RUNTIME_OUT} ;\ + fi ; exit 0 )