Commit 823c8cd5 by Geoff Lang

Move the enumerate_files script to the build directory.

BUG=angle:552 Change-Id: Ie45a38bb26edfe1bf6d12b5d4918110be13acc33 Reviewed-on: https://chromium-review.googlesource.com/187531Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 2747b9a5
...@@ -11,7 +11,7 @@ for i in range(1, len(sys.argv)): ...@@ -11,7 +11,7 @@ for i in range(1, len(sys.argv)):
if arg == "-types": if arg == "-types":
foundTypesArg = True foundTypesArg = True
continue continue
if foundTypesArg: if foundTypesArg:
filetypes.append(arg) filetypes.append(arg)
else: else:
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables':
{
'angle_build_scripts_path': '..',
},
'targets': 'targets':
[ [
{ {
...@@ -10,7 +14,7 @@ ...@@ -10,7 +14,7 @@
'type': 'executable', 'type': 'executable',
'dependencies': [ '../src/angle.gyp:translator_static', ], 'dependencies': [ '../src/angle.gyp:translator_static', ],
'include_dirs': [ '../include', ], 'include_dirs': [ '../include', ],
'sources': [ '<!@(python enumerate_files.py translator -types *.cpp *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py translator -types *.cpp *.h)' ],
}, },
], ],
'conditions': 'conditions':
...@@ -30,7 +34,7 @@ ...@@ -30,7 +34,7 @@
], ],
'sources': 'sources':
[ [
'<!@(python enumerate_files.py translator -types *.cpp *.h)', '<!@(python <(angle_build_scripts_path)/enumerate_files.py translator -types *.cpp *.h)',
], ],
}, },
...@@ -49,7 +53,7 @@ ...@@ -49,7 +53,7 @@
], ],
'sources': 'sources':
[ [
'<!@(python enumerate_files.py gles2_book/Common -types *.c *.h)' '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Common -types *.c *.h)'
], ],
'direct_dependent_settings': 'direct_dependent_settings':
{ {
...@@ -65,26 +69,26 @@ ...@@ -65,26 +69,26 @@
'target_name': 'hello_triangle', 'target_name': 'hello_triangle',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/Hello_Triangle -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Hello_Triangle -types *.c *.h)' ],
}, },
{ {
'target_name': 'mip_map_2d', 'target_name': 'mip_map_2d',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/MipMap2D -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/MipMap2D -types *.c *.h)' ],
}, },
{ {
'target_name': 'multi_texture', 'target_name': 'multi_texture',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/MultiTexture -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/MultiTexture -types *.c *.h)' ],
'copies': 'copies':
[ [
{ {
'destination': '<(PRODUCT_DIR)', 'destination': '<(PRODUCT_DIR)',
'files': [ '<!@(python enumerate_files.py gles2_book/MultiTexture -types *.tga)' ], 'files': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/MultiTexture -types *.tga)' ],
} }
] ]
}, },
...@@ -93,12 +97,12 @@ ...@@ -93,12 +97,12 @@
'target_name': 'particle_system', 'target_name': 'particle_system',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/ParticleSystem -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/ParticleSystem -types *.c *.h)' ],
'copies': 'copies':
[ [
{ {
'destination': '<(PRODUCT_DIR)', 'destination': '<(PRODUCT_DIR)',
'files': [ '<!@(python enumerate_files.py gles2_book/ParticleSystem -types *.tga)' ], 'files': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/ParticleSystem -types *.tga)' ],
} }
] ]
}, },
...@@ -107,42 +111,42 @@ ...@@ -107,42 +111,42 @@
'target_name': 'simple_texture_2d', 'target_name': 'simple_texture_2d',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/Simple_Texture2D -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Simple_Texture2D -types *.c *.h)' ],
}, },
{ {
'target_name': 'simple_texture_cubemap', 'target_name': 'simple_texture_cubemap',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/Simple_TextureCubemap -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Simple_TextureCubemap -types *.c *.h)' ],
}, },
{ {
'target_name': 'simple_vertex_shader', 'target_name': 'simple_vertex_shader',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/Simple_VertexShader -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Simple_VertexShader -types *.c *.h)' ],
}, },
{ {
'target_name': 'stencil_test', 'target_name': 'stencil_test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/Stencil_Test -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Stencil_Test -types *.c *.h)' ],
}, },
{ {
'target_name': 'texture_wrap', 'target_name': 'texture_wrap',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/TextureWrap -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/TextureWrap -types *.c *.h)' ],
}, },
{ {
'target_name': 'post_sub_buffer', 'target_name': 'post_sub_buffer',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'es_util' ], 'dependencies': [ 'es_util' ],
'sources': [ '<!@(python enumerate_files.py gles2_book/PostSubBuffer -types *.c *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/PostSubBuffer -types *.c *.h)' ],
}, },
], ],
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
'angle_code': 1, 'angle_code': 1,
'angle_post_build_script%': 0, 'angle_post_build_script%': 0,
'angle_relative_src_path%': '', 'angle_relative_src_path%': '',
'angle_build_scripts_path': '..',
}, },
'includes': 'includes':
[ [
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
'target_name': 'preprocessor', 'target_name': 'preprocessor',
'type': 'static_library', 'type': 'static_library',
'include_dirs': [ ], 'include_dirs': [ ],
'sources': [ '<!@(python enumerate_files.py compiler/preprocessor -types *.cpp *.h)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler/preprocessor -types *.cpp *.h)' ],
'msvs_disabled_warnings': [ 4267 ], 'msvs_disabled_warnings': [ 4267 ],
}, },
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
[ [
'ANGLE_TRANSLATOR_IMPLEMENTATION', 'ANGLE_TRANSLATOR_IMPLEMENTATION',
], ],
'sources': [ '<!@(python enumerate_files.py compiler/translator third_party/compiler common -types *.cpp *.h *.y *.l )', ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler/translator third_party/compiler common ../include -types *.cpp *.h *.y *.l )', ],
'conditions': 'conditions':
[ [
['OS=="win"', ['OS=="win"',
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
'ANGLE_TRANSLATOR_STATIC', 'ANGLE_TRANSLATOR_STATIC',
], ],
}, },
'sources': [ '<!@(python enumerate_files.py compiler/translator third_party/compiler common -types *.cpp *.h *.y *.l )', ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler/translator third_party/compiler common ../include -types *.cpp *.h *.y *.l )', ],
'conditions': 'conditions':
[ [
['OS=="win"', ['OS=="win"',
......
import fnmatch
import os
import sys
rootdirs = [ ]
filetypes = [ ]
foundTypesArg = False
for i in range(1, len(sys.argv)):
arg = sys.argv[i]
if arg == "-types":
foundTypesArg = True
continue
if foundTypesArg:
filetypes.append(arg)
else:
rootdirs.append(arg)
for rootdir in rootdirs:
for root, dirnames, filenames in os.walk(rootdir):
for file in filenames:
for type in filetypes:
if fnmatch.fnmatchcase(file, type):
print os.path.join(root, file).replace("\\", "/")
break
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
'libGLESv2', 'libGLESv2',
'<(SHARED_INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)',
], ],
'sources': [ '<!@(python enumerate_files.py common libEGL -types *.cpp *.h *.def libEGL.rc)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py common libEGL ../include -types *.cpp *.h *.def libEGL.rc)' ],
'msvs_disabled_warnings': [ 4267 ], 'msvs_disabled_warnings': [ 4267 ],
'msvs_settings': 'msvs_settings':
{ {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
'libGLESv2', 'libGLESv2',
'<(SHARED_INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)',
], ],
'sources': [ '<!@(python enumerate_files.py common libGLESv2 third_party/murmurhash -types *.cpp *.h *.hlsl *.vs *.ps *.bat *.def libGLESv2.rc)' ], 'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py common libGLESv2 third_party/murmurhash ../include -types *.cpp *.h *.hlsl *.vs *.ps *.bat *.def libGLESv2.rc)', ],
'msvs_disabled_warnings': [ 4267 ], 'msvs_disabled_warnings': [ 4267 ],
'msvs_settings': 'msvs_settings':
{ {
......
import fnmatch
import os
import sys
rootdirs = [ ]
filetypes = [ ]
foundTypesArg = False
for i in range(1, len(sys.argv)):
arg = sys.argv[i]
if arg == "-types":
foundTypesArg = True
continue
if foundTypesArg:
filetypes.append(arg)
else:
rootdirs.append(arg)
for rootdir in rootdirs:
for root, dirnames, filenames in os.walk(rootdir):
for file in filenames:
for type in filetypes:
if fnmatch.fnmatchcase(file, type):
print os.path.join(root, file).replace("\\", "/")
break
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables':
{
'angle_build_scripts_path': '..',
},
'targets': 'targets':
[ [
{ {
...@@ -73,7 +77,7 @@ ...@@ -73,7 +77,7 @@
], ],
'sources': 'sources':
[ [
'<!@(python enumerate_files.py preprocessor_tests -types *.cpp *.h)' '<!@(python <(angle_build_scripts_path)/enumerate_files.py preprocessor_tests -types *.cpp *.h)'
], ],
}, },
...@@ -95,7 +99,7 @@ ...@@ -95,7 +99,7 @@
], ],
'sources': 'sources':
[ [
'<!@(python enumerate_files.py compiler_tests -types *.cpp *.h)' '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler_tests -types *.cpp *.h)'
], ],
}, },
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment