| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 'trace_viewer_src_dir': '../../../third_party/trace-viewer', | 7 'trace_viewer_src_dir': '../../../third_party/trace-viewer', |
| 8 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing', | 8 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing', |
| 9 }, | 9 }, |
| 10 'targets': [ | 10 'targets': [ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 'actions': [ | 51 'actions': [ |
| 52 { | 52 { |
| 53 'action_name': 'tracing_resources', | 53 'action_name': 'tracing_resources', |
| 54 # This can't use build/grit_action.gypi because the grd file | 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 | 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. | 56 # the real inputs/outputs at GYP time isn't possible. |
| 57 'variables': { | 57 'variables': { |
| 58 'grit_cmd': ['python', '../../../tools/grit/grit.py'], | 58 'grit_cmd': ['python', '../../../tools/grit/grit.py'], |
| 59 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing
/tracing_resources.grd', | 59 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing
/tracing_resources.grd', |
| 60 'grit_rc_header_format%': '', | 60 'grit_rc_header_format%': '', |
| 61 |
| 62 'conditions': [ |
| 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', |
| 72 }, { |
| 73 'write_only_new': '0', |
| 74 }], |
| 75 ], |
| 61 }, | 76 }, |
| 62 'inputs': [ | 77 'inputs': [ |
| 63 '<(grit_grd_file)', | 78 '<(grit_grd_file)', |
| 64 '<!@pymod_do_main(grit_info --inputs)', | 79 '<!@pymod_do_main(grit_info --inputs)', |
| 65 ], | 80 ], |
| 66 'outputs': [ | 81 'outputs': [ |
| 67 '<(grit_out_dir)/grit/tracing_resources.h', | 82 '<(grit_out_dir)/grit/tracing_resources.h', |
| 68 '<(grit_out_dir)/tracing_resources.pak', | 83 '<(grit_out_dir)/tracing_resources.pak', |
| 69 ], | 84 ], |
| 70 'action': ['<@(grit_cmd)', | 85 'action': ['<@(grit_cmd)', |
| 71 '-i', '<(grit_grd_file)', 'build', | 86 '-i', '<(grit_grd_file)', 'build', |
| 72 '-f', '<(DEPTH)/tools/gritsettings/resource_ids', | 87 '-f', '<(DEPTH)/tools/gritsettings/resource_ids', |
| 73 '-o', '<(grit_out_dir)', | 88 '-o', '<(grit_out_dir)', |
| 89 '--write-only-new=<(write_only_new)', |
| 74 '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', | 90 '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', |
| 75 '<@(grit_defines)', | 91 '<@(grit_defines)', |
| 76 '<@(grit_rc_header_format)'], | 92 '<@(grit_rc_header_format)'], |
| 77 'message': 'Generating resources from <(grit_grd_file)', | 93 'message': 'Generating resources from <(grit_grd_file)', |
| 78 } | 94 } |
| 79 ], | 95 ], |
| 80 'includes': [ '../../../build/grit_target.gypi' ] | 96 'includes': [ '../../../build/grit_target.gypi' ] |
| 81 } | 97 } |
| 82 ] | 98 ] |
| 83 } | 99 } |
| OLD | NEW |