Exclude protoc objects from merge_libs.py.

BUG=b/12567343
R=wjia@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/7249004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5391 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2014-01-16 00:31:57 +00:00
parent 4b26e2eee3
commit 8f35afab8c

View File

@ -21,7 +21,8 @@ def FindFiles(path, pattern):
"""Finds files matching |pattern| under |path|.
Returns a list of file paths matching |pattern|, by walking the directory tree
under |path|. Filenames containing the string 'do_not_use' are excluded.
under |path|. Filenames containing the string 'do_not_use' or 'protoc' are
excluded.
Args:
path: The root path for the search.
@ -34,7 +35,7 @@ def FindFiles(path, pattern):
files = []
for root, _, filenames in os.walk(path):
for filename in fnmatch.filter(filenames, pattern):
if 'do_not_use' not in filename:
if 'do_not_use' not in filename and 'protoc' not in filename:
# We use the relative path here to avoid "argument list too long"
# errors on Linux.
files.append(os.path.relpath(os.path.join(root, filename)))