#!/bin/csh -f

# Clean the autotools.  Could do distclean in each (not quite standard...),
# but little extra effort in rebuilding from scratch, so just delete the
# directory completely.

# See which tool directories exist.

set autoconf = (`find . -name autoconf\* -type d -prune`)
set automake = (`find . -name automake\* -type d -prune`)
set libtool  = (`find . -name libtool\*  -type d -prune`)

foreach dir ($autoconf $automake $libtool)

    echo cleaning $dir
    if (-d $dir) then

	/bin/rm -rf $dir

#	cd $dir
#	if ($tool == "libtool") then
#	    make distclean-libtool
#	else
#	    make distclean
#	endif
#	cd ..

    endif
end
