Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / browser / tracing / tracing_resources.gyp
blob1efc0ad72c62c46716bb549f3a4fa3df7642c7ad
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'trace_viewer_src_dir': '../../../third_party/trace-viewer',
8     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing',
9   },
10   'targets': [
11     {
12       # GN version: //content/browser/tracing:generate_tracing_grd
13       'target_name': 'generate_tracing_grd',
14       'type': 'none',
15       'dependencies': [
16         '<(trace_viewer_src_dir)/trace_viewer.gyp:generate_about_tracing',
17       ],
18       'actions': [
19         {
20           'action_name': 'generate_tracing_grd',
21           'script_name': 'generate_trace_viewer_grd.py',
22           'input_pages': [
23             '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/about_tracing.html',
24             '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/about_tracing.js'
25           ],
26           'inputs': [
27             '<@(_script_name)',
28             '<@(_input_pages)'
29           ],
30           'outputs': [
31             '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd'
32           ],
33           'action': [
34             'python', '<@(_script_name)', '<@(_input_pages)', '--output', '<@(_outputs)'
35           ]
36         }
37       ]
38     },
40     {
41       # GN version: //content/browser/tracing:resources
42       'target_name': 'tracing_resources',
43       'type': 'none',
44       'dependencies': [
45         '<(trace_viewer_src_dir)/trace_viewer.gyp:generate_about_tracing',
46         'generate_tracing_grd',
47       ],
48       'variables': {
49         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing',
50       },
51       'actions': [
52         {
53           'action_name': 'tracing_resources',
54           # This can't use build/grit_action.gypi because the grd file
55           # is generated at build time, so the trick of using grit_info to get
56           # the real inputs/outputs at GYP time isn't possible.
57           'variables': {
58             'grit_cmd': ['python', '../../../tools/grit/grit.py'],
59             'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd',
60             'grit_rc_header_format%': '',
61           },
62           'inputs': [
63             '<(grit_grd_file)',
64             '<!@pymod_do_main(grit_info --inputs)',
65           ],
66           'outputs': [
67             '<(grit_out_dir)/grit/tracing_resources.h',
68             '<(grit_out_dir)/tracing_resources.pak',
69           ],
70           'action': ['<@(grit_cmd)',
71                      '-i', '<(grit_grd_file)', 'build',
72                      '-f', '<(DEPTH)/tools/gritsettings/resource_ids',
73                      '-o', '<(grit_out_dir)',
74                      '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)',
75                      '<@(grit_defines)',
76                      '<@(grit_rc_header_format)'],
77           'message': 'Generating resources from <(grit_grd_file)',
78         }
79       ],
80       'includes': [ '../../../build/grit_target.gypi' ]
81     }
82   ]