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.
7 'trace_viewer_src_dir': '../../../third_party/catapult/tracing',
8 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing',
12 # GN version: //content/browser/tracing:generate_tracing_grd
13 'target_name': 'generate_tracing_grd',
16 '<(trace_viewer_src_dir)/trace_viewer.gyp:generate_about_tracing',
20 'action_name': 'generate_tracing_grd',
21 'script_name': 'generate_trace_viewer_grd.py',
23 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/about_tracing.html',
24 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/about_tracing.js'
31 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd'
34 'python', '<@(_script_name)', '<@(_input_pages)', '--output', '<@(_outputs)'
41 # GN version: //content/browser/tracing:resources
42 'target_name': 'tracing_resources',
45 '<(trace_viewer_src_dir)/trace_viewer.gyp:generate_about_tracing',
46 'generate_tracing_grd',
49 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing',
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.
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%': '',
63 # These scripts can skip writing generated files if they are
64 # identical to the already existing files, which avoids further
65 # build steps, like recompilation. However, a dependency (earlier
66 # build step) having a newer timestamp than an output (later
67 # build step) confuses some build systems, so only use this on
68 # ninja, which explicitly supports this use case (gyp turns all
69 # actions into ninja restat rules).
70 ['"<(GENERATOR)"=="ninja"', {
71 'write_only_new': '1',
73 'write_only_new': '0',
79 '<!@pymod_do_main(grit_info --inputs)',
82 '<(grit_out_dir)/grit/tracing_resources.h',
83 '<(grit_out_dir)/tracing_resources.pak',
85 'action': ['<@(grit_cmd)',
86 '-i', '<(grit_grd_file)', 'build',
87 '-f', '<(DEPTH)/tools/gritsettings/resource_ids',
88 '-o', '<(grit_out_dir)',
89 '--write-only-new=<(write_only_new)',
90 '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)',
92 '<@(grit_rc_header_format)'],
93 'message': 'Generating resources from <(grit_grd_file)',
96 'includes': [ '../../../build/grit_target.gypi' ]