-# Remove junk from distribution dir
-find ${DISTDIR} -type f -name .cvsignore -exec rm {} \;
-find ${DISTDIR} -type d -name CVS | xargs rm -r
+echo "Cleaning distribution directory ${DISTDIR}"
+find ${DISTDIR} -type f -name .cvsignore -exec rm -f {} \;
+find ${DISTDIR} -type d -name CVS | xargs rm -rf
+find ${DISTDIR} -type f -name '*~' -or -name '#*' -or -name '#*#' | xargs rm -f