1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/build/grit_action.gypi Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +# Copyright (c) 2011 The Chromium Authors. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +# This file is meant to be included into an action to invoke grit in a 1.9 +# consistent manner. To use this the following variables need to be 1.10 +# defined: 1.11 +# grit_grd_file: string: grd file path 1.12 +# grit_out_dir: string: the output directory path 1.13 + 1.14 +# It would be really nice to do this with a rule instead of actions, but it 1.15 +# would need to determine inputs and outputs via grit_info on a per-file 1.16 +# basis. GYP rules don’t currently support that. They could be extended to 1.17 +# do this, but then every generator would need to be updated to handle this. 1.18 + 1.19 +{ 1.20 + 'variables': { 1.21 + 'grit_cmd': ['python', '<(DEPTH)/tools/grit/grit.py'], 1.22 + }, 1.23 + 'inputs': [ 1.24 + '<!@pymod_do_main(grit_info <@(grit_defines) --inputs <(grit_grd_file))', 1.25 + ], 1.26 + 'outputs': [ 1.27 + '<!@pymod_do_main(grit_info <@(grit_defines) --outputs \'<(grit_out_dir)\' <(grit_grd_file))', 1.28 + ], 1.29 + 'action': ['<@(grit_cmd)', 1.30 + '-i', '<(grit_grd_file)', 'build', 1.31 + '-fGRIT_DIR/../gritsettings/resource_ids', 1.32 + '-o', '<(grit_out_dir)', 1.33 + '<@(grit_defines)' ], 1.34 + 'msvs_cygwin_shell': 0, 1.35 + 'message': 'Generating resources from <(grit_grd_file)', 1.36 +}