#! /bin/csh
# 
# This script removes all of the examples
set MARCH = `bin/tarch`
alias cd 'cd'
find . -name extype -print > .tmp
foreach file (`cat .tmp`)
   set d = $file:h
   set f = `cat $file`
   foreach ex ($f)
	set ex = `echo $ex | sed s%ARCH%$MARCH%g`
	/bin/rm -f $d/$ex
   end
   # This make makes sure that the includes can be read.
   (cd $d ; make ARCH=$MARCH BOPT=g clean )
end
/bin/rm -f .tmp
