AT_SETUP([Checking for present project disclaimer]) AT_KEYWORDS([CodeCheck disclaimer]) ok="unity.cpp pugixml.cpp" echo `pwd` echo "${#ok[*]} are ok to not contain config.h: ${ok[*]}." 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 test $found -eq 0 then AT_CHECK([egrep -q " * Project: MoleCuilder" $file], 0, [ignore], [ignore], [echo "Could not find project disclaimer in $file."]) AT_CHECK([egrep -q " * Copyright.* University of Bonn" $file], 0, [ignore], [ignore], [echo "Could not find copyright with current year ${year} in $file."]) fi done AT_CLEANUP