Commit f0b40601 by Jamie Madill

Clean up gyp build scripts.

We can use angle_path instead of angle_build_scripts_path to locate enumerate_files.py. Also pass angle_path to the post-build script hook, as this information is necessary to locate the root angle folder. BUG=angle:592 Change-Id: I06b3f0201751d90b7c1efdefe8db07d114bd87dd Reviewed-on: https://chromium-review.googlesource.com/191082Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 41a49272
......@@ -3,10 +3,6 @@
# found in the LICENSE file.
{
'variables':
{
'angle_build_scripts_path': '..',
},
'targets':
[
{
......@@ -14,7 +10,7 @@
'type': 'executable',
'dependencies': [ '../src/angle.gyp:translator', ],
'include_dirs': [ '../include', ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py translator -types *.cpp *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py translator -types *.cpp *.h)' ],
},
],
'conditions':
......@@ -34,7 +30,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py translator -types *.cpp *.h)',
'<!@(python <(angle_path)/enumerate_files.py translator -types *.cpp *.h)',
],
},
......@@ -43,7 +39,7 @@
'type': 'executable',
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py dds_to_header -types *.cpp)',
'<!@(python <(angle_path)/enumerate_files.py dds_to_header -types *.cpp)',
],
},
......@@ -62,7 +58,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Common -types *.c *.h)'
'<!@(python <(angle_path)/enumerate_files.py gles2_book/Common -types *.c *.h)'
],
'direct_dependent_settings':
{
......@@ -78,26 +74,26 @@
'target_name': 'hello_triangle',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Hello_Triangle -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/Hello_Triangle -types *.c *.h)' ],
},
{
'target_name': 'mip_map_2d',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/MipMap2D -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/MipMap2D -types *.c *.h)' ],
},
{
'target_name': 'multi_texture',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/MultiTexture -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/MultiTexture -types *.c *.h)' ],
'copies':
[
{
'destination': '<(PRODUCT_DIR)',
'files': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/MultiTexture -types *.tga)' ],
'files': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/MultiTexture -types *.tga)' ],
}
]
},
......@@ -106,12 +102,12 @@
'target_name': 'particle_system',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/ParticleSystem -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/ParticleSystem -types *.c *.h)' ],
'copies':
[
{
'destination': '<(PRODUCT_DIR)',
'files': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/ParticleSystem -types *.tga)' ],
'files': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/ParticleSystem -types *.tga)' ],
}
]
},
......@@ -120,42 +116,42 @@
'target_name': 'simple_texture_2d',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Simple_Texture2D -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/Simple_Texture2D -types *.c *.h)' ],
},
{
'target_name': 'simple_texture_cubemap',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Simple_TextureCubemap -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/Simple_TextureCubemap -types *.c *.h)' ],
},
{
'target_name': 'simple_vertex_shader',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Simple_VertexShader -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/Simple_VertexShader -types *.c *.h)' ],
},
{
'target_name': 'stencil_test',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/Stencil_Test -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/Stencil_Test -types *.c *.h)' ],
},
{
'target_name': 'texture_wrap',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/TextureWrap -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/TextureWrap -types *.c *.h)' ],
},
{
'target_name': 'post_sub_buffer',
'type': 'executable',
'dependencies': [ 'es_util' ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py gles2_book/PostSubBuffer -types *.c *.h)' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py gles2_book/PostSubBuffer -types *.c *.h)' ],
},
],
}
......
......@@ -8,7 +8,6 @@
'angle_code': 1,
'angle_post_build_script%': 0,
'angle_relative_src_path%': '.',
'angle_build_scripts_path': '..',
},
'includes':
......@@ -79,9 +78,9 @@
{
'action_name': 'ANGLE Post-Build Script',
'message': 'Running <(angle_post_build_script)...',
'inputs': [ '<(angle_post_build_script)', '<!@(["python", "<(angle_post_build_script)", "inputs", "<(CONFIGURATION_NAME)", "$(PlatformName)", "<(PRODUCT_DIR)"])' ],
'outputs': [ '<!@(python <(angle_post_build_script) outputs "<(CONFIGURATION_NAME)" "$(PlatformName)" "<(PRODUCT_DIR)")' ],
'action': ['python', '<(angle_post_build_script)', 'run', '<(CONFIGURATION_NAME)', '$(PlatformName)', '<(PRODUCT_DIR)'],
'inputs': [ '<(angle_post_build_script)', '<!@(["python", "<(angle_post_build_script)", "inputs", "<(angle_path)", "<(CONFIGURATION_NAME)", "$(PlatformName)", "<(PRODUCT_DIR)"])' ],
'outputs': [ '<!@(python <(angle_post_build_script) outputs "<(angle_path)" "<(CONFIGURATION_NAME)" "$(PlatformName)" "<(PRODUCT_DIR)")' ],
'action': ['python', '<(angle_post_build_script)', 'run', '<(angle_path)', '<(CONFIGURATION_NAME)', '$(PlatformName)', '<(PRODUCT_DIR)'],
}
] #actions
}
......
......@@ -9,7 +9,7 @@
'target_name': 'preprocessor',
'type': 'static_library',
'include_dirs': [ ],
'sources': [ '<!@(python <(angle_build_scripts_path)/enumerate_files.py compiler/preprocessor -types *.cpp *.h *.y *.l )' ],
'sources': [ '<!@(python <(angle_path)/enumerate_files.py compiler/preprocessor -types *.cpp *.h *.y *.l )' ],
# TODO(jschuh): http://crbug.com/167187 size_t -> int
'msvs_disabled_warnings': [ 4267 ],
},
......@@ -39,7 +39,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py \
'<!@(python <(angle_path)/enumerate_files.py \
-dirs compiler/translator third_party/compiler common ../include \
-types *.cpp *.h *.y *.l)',
],
......
......@@ -22,7 +22,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py \
'<!@(python <(angle_path)/enumerate_files.py \
-dirs common libEGL ../include \
-types *.cpp *.h *.def *.rc)',
],
......
......@@ -36,7 +36,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py \
'<!@(python <(angle_path)/enumerate_files.py \
-dirs common libGLESv2 third_party/murmurhash ../include \
-types *.cpp *.h *.hlsl *.vs *.ps *.bat *.def *.rc \
-excludes */d3d/* */d3d9/* */d3d11/*)',
......@@ -50,7 +50,7 @@
{
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py \
'<!@(python <(angle_path)/enumerate_files.py \
-dirs libGLESv2/renderer/d3d libGLESv2/renderer/d3d9 \
-types *.cpp *.h *.vs *.ps *.bat)',
],
......@@ -73,7 +73,7 @@
{
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py \
'<!@(python <(angle_path)/enumerate_files.py \
-dirs libGLESv2/renderer/d3d libGLESv2/renderer/d3d11 \
-types *.cpp *.h *.hlsl *.bat)',
],
......
......@@ -3,10 +3,6 @@
# found in the LICENSE file.
{
'variables':
{
'angle_build_scripts_path': '..',
},
'targets':
[
{
......@@ -129,7 +125,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py angle_tests -types *.cpp *.h *.inl)'
'<!@(python <(angle_path)/enumerate_files.py angle_tests -types *.cpp *.h *.inl)'
],
},
{
......@@ -149,7 +145,7 @@
],
'sources':
[
'<!@(python <(angle_build_scripts_path)/enumerate_files.py standalone_tests -types *.cpp *.h)'
'<!@(python <(angle_path)/enumerate_files.py standalone_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