Recoded with help from Toby to use rewriting instead of the
subst rule -- the latter was too slow. But it must resort to the subst rule
if the equality contains Vars.
#! /bin/sh
#rm-logfiles: remove useless files from subdirectories
rm log */make*.log */make*.log.gz
rm */test
find . -name '.*.thy.ML' -print -exec rm {} \;