AT_SETUP([Checking for present MemDebug.hpp include]) AT_KEYWORDS([CodeCheck,MemDebug]) m4_include(atlocal) ok="builder.cpp MemDebug.cpp SubspaceFactorizer.cpp TestRunner.cpp" echo `pwd` echo "${#ok[*]} are ok to not contain MemDebug.hpp: ${ok[0]} ${ok[1]}." liste=`find ${abs_top_srcdir}/src -name '*.cpp'` for file in $liste do # check whether its one of the excluded ones found=0 for item in $ok do if test "$item" == "`basename $file`" then found=1 break fi done # if not, check whether it contains the include if its NOT a unit test if test -z `echo $file | grep unittests` then if test $found -eq 0 then AT_CHECK([egrep -q '^#include.*MemDebug.hpp' $file], 0, [ignore], [ignore], [echo "Could not find MemDebug.hpp include in $file."]) fi fi done AT_CLEANUP