#!/bin/sh
# TOPO	loTOs comPOiler	CLEANER
# ====	---------------

# You may wish to remove sources thoroughly,
# but I leave this decision up to you
# rm -rf src

HERE=`pwd`
export HERE

tryit () {
  if test -d $HERE/$1
  then
    echo "cd $1; make clean"
    cd $HERE/$1
    make clean
  else
    echo "tool <$1> is not about!"
  fi
}

SHELL=/bin/sh
export SHELL

# the following lines will try to clean up as much as possible

rm -f *~ *.bak topo1

# FrontEnd
  tryit src/lfe
  tryit src/lsa
  tryit src/misc
  tryit src/stdlib

# Miscellaneous
  tryit src/dtok
  tryit src/adtxr
  tryit src/lxref
  tryit src/pl
  tryit src/rdtts
  tryit src/drast

# Compiler
  tryit src/glad
  tryit src/om
  tryit src/omdrast
  tryit src/idle

# Interpreter
  tryit src/ldi
  tryit src/ildi
  tryit src/interlib
  tryit src/ltg

# l2c
  tryit src/d2c
  tryit src/omlbC
  tryit src/m2c

# l2a
  tryit src/Adamisc
  tryit src/d2ada
  tryit src/omlbADA
  tryit src/labra

# lite
  tryit src/ast2cr

exit 0
