| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 'targets': [ | 6 'targets': [ |
| 7 { | 7 { |
| 8 'target_name': 'devtools_resources', | 8 'target_name': 'devtools_resources', |
| 9 'type': 'none', | 9 'type': 'none', |
| 10 'dependencies': [ | 10 'dependencies': [ |
| 11 '../../../third_party/WebKit/public/blink_devtools.gyp:blink_generate_de
vtools_grd', | 11 '../../../third_party/WebKit/public/blink_devtools.gyp:blink_generate_de
vtools_grd', |
| 12 ], | 12 ], |
| 13 'variables': { | 13 'variables': { |
| 14 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit', | 14 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit', |
| 15 }, | 15 }, |
| 16 'actions': [ | 16 'actions': [ |
| 17 { | 17 { |
| 18 'action_name': 'devtools_resources', | 18 'action_name': 'devtools_resources', |
| 19 # This can't use build/grit_action.gypi because the grd file | 19 # This can't use build/grit_action.gypi because the grd file |
| 20 # is generated at build time, so the trick of using grit_info to get | 20 # is generated at build time, so the trick of using grit_info to get |
| 21 # the real inputs/outputs at GYP time isn't possible. | 21 # the real inputs/outputs at GYP time isn't possible. |
| 22 'variables': { | 22 'variables': { |
| 23 'grit_cmd': ['python', '../../../tools/grit/grit.py'], | 23 'grit_cmd': ['python', '../../../tools/grit/grit.py'], |
| 24 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resou
rces.grd', | 24 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resou
rces.grd', |
| 25 'grit_rc_header_format%': '', | 25 'grit_rc_header_format%': '', |
| 26 |
| 27 'conditions': [ |
| 28 # These scripts can skip writing generated files if they are |
| 29 # identical to the already existing files, which avoids further |
| 30 # build steps, like recompilation. However, a dependency (earlier |
| 31 # build step) having a newer timestamp than an output (later |
| 32 # build step) confuses some build systems, so only use this on |
| 33 # ninja, which explicitly supports this use case (gyp turns all |
| 34 # actions into ninja restat rules). |
| 35 ['"<(GENERATOR)"=="ninja"', { |
| 36 'write_only_new': '1', |
| 37 }, { |
| 38 'write_only_new': '0', |
| 39 }], |
| 40 ], |
| 26 }, | 41 }, |
| 27 'inputs': [ | 42 'inputs': [ |
| 28 '<(grit_grd_file)', | 43 '<(grit_grd_file)', |
| 29 '<!@pymod_do_main(grit_info --inputs)', | 44 '<!@pymod_do_main(grit_info --inputs)', |
| 30 ], | 45 ], |
| 31 'outputs': [ | 46 'outputs': [ |
| 32 '<(grit_out_dir)/grit/devtools_resources.h', | 47 '<(grit_out_dir)/grit/devtools_resources.h', |
| 33 '<(grit_out_dir)/devtools_resources.pak', | 48 '<(grit_out_dir)/devtools_resources.pak', |
| 34 '<(grit_out_dir)/grit/devtools_resources_map.cc', | 49 '<(grit_out_dir)/grit/devtools_resources_map.cc', |
| 35 '<(grit_out_dir)/grit/devtools_resources_map.h', | 50 '<(grit_out_dir)/grit/devtools_resources_map.h', |
| 36 ], | 51 ], |
| 37 'action': ['<@(grit_cmd)', | 52 'action': ['<@(grit_cmd)', |
| 38 '-i', '<(grit_grd_file)', 'build', | 53 '-i', '<(grit_grd_file)', 'build', |
| 39 '-f', '<(DEPTH)/tools/gritsettings/resource_ids', | 54 '-f', '<(DEPTH)/tools/gritsettings/resource_ids', |
| 40 '-o', '<(grit_out_dir)', | 55 '-o', '<(grit_out_dir)', |
| 56 '--write-only-new=<(write_only_new)', |
| 41 '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', | 57 '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', |
| 42 '<@(grit_defines)', | 58 '<@(grit_defines)', |
| 43 '<@(grit_rc_header_format)'], | 59 '<@(grit_rc_header_format)'], |
| 44 'message': 'Generating resources from <(grit_grd_file)', | 60 'message': 'Generating resources from <(grit_grd_file)', |
| 45 }, | 61 }, |
| 46 ], | 62 ], |
| 47 'direct_dependent_settings': { | 63 'direct_dependent_settings': { |
| 48 'include_dirs': [ | 64 'include_dirs': [ |
| 49 '<(SHARED_INTERMEDIATE_DIR)', | 65 '<(SHARED_INTERMEDIATE_DIR)', |
| 50 ] | 66 ] |
| 51 }, | 67 }, |
| 52 'includes': [ '../../../build/grit_target.gypi' ], | 68 'includes': [ '../../../build/grit_target.gypi' ], |
| 53 }, | 69 }, |
| 54 ], | 70 ], |
| 55 } | 71 } |
| OLD | NEW |