Makefile.am: Add more checks to distcheck-hook
authorMichael Hanselmann <hansmi@google.com>
Tue, 27 Oct 2009 14:24:46 +0000 (15:24 +0100)
committerMichael Hanselmann <hansmi@google.com>
Wed, 28 Oct 2009 10:10:31 +0000 (11:10 +0100)
Also use grep only to convert find's output to an exit status.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

Makefile.am

index 1ceaa41..cbfa69c 100644 (file)
@@ -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