diff --git a/Makefile.am b/Makefile.am index 1ceaa412d225b2ee10036f42f54f423b70928f70..cbfa69c1c3a453a94719ba20b6be1cb297fe9458 100644 --- a/Makefile.am +++ b/Makefile.am @@ -451,8 +451,16 @@ check-local: # a dist hook rule for catching revision control directories distcheck-hook: - if find $(top_distdir) | grep -F -e '.svn' -e '.git'; then \ - echo "Found revision control files in final archive" 1>&2 ; \ + if find $(top_distdir) -name .svn -or -name .git | grep .; then \ + echo "Found revision control files in final archive." 1>&2; \ + exit 1; \ + fi + if find $(top_distdir) -name '*.py[co]' | grep .; then \ + echo "Found Python byte code in final archive." 1>&2; \ + exit 1; \ + fi + if find $(top_distdir) -name '*~' | grep .; then \ + echo "Found backup files in final archive." 1>&2; \ exit 1; \ fi