#!/bin/sh

rm compile-tests.log
rm link-test-programs.log
rm run-test-programs.log

make -C ../theme-d-code/examples -f user.mk clean

# We don't delete the target files of modules numerical-test-env and
# matrix-test-env.
rm ../theme-d-code/tests/__intf_test*.go
rm ../theme-d-code/tests/__intf_test*.aux
rm ../theme-d-code/tests/__intf_test*.tree-il
rm ../theme-d-code/tests/__intf_test*.scm
rm ../theme-d-code/tests/__impl_test*.go
rm ../theme-d-code/tests/__impl_test*.aux
rm ../theme-d-code/tests/__impl_test*.tree-il
rm ../theme-d-code/tests/__impl_test*.scm
rm ../theme-d-code/tests/test*.tci
rm ../theme-d-code/tests/test*.tcb
rm ../theme-d-code/tests/test*.tcp
rm ../theme-d-code/tests/test*.tcs
rm ../theme-d-code/tests/test*.go
rm ../theme-d-code/tests/test*.tree-il
rm ../theme-d-code/tests/test*.scm

find ../theme-d-code/tests -name "*.build" -exec sh -c ' \
  rm -f $1/target*.go ; \
  rm -f $1/target*.tree-il ; \
  rm -f $1/target*.scm ; ' _ {} \;
find ../theme-d-code/tests -name "*.build" -exec sh -c ' \
  rmdir $1 ; ' _ {} \;
