Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
| 6 | 6 |
| 7 | |
| 8 if (is_android) { | 7 if (is_android) { |
| 9 import("//build/config/android/rules.gni") | 8 import("//build/config/android/rules.gni") |
| 10 android_generated_java_resources = [ | 9 android_generated_java_resources = [ |
| 11 "java/res/values-am/generated_resources.xml", | 10 "java/res/values-am/generated_resources.xml", |
| 12 "java/res/values-ar/generated_resources.xml", | 11 "java/res/values-ar/generated_resources.xml", |
| 13 "java/res/values-bg/generated_resources.xml", | 12 "java/res/values-bg/generated_resources.xml", |
| 14 "java/res/values-ca/generated_resources.xml", | 13 "java/res/values-ca/generated_resources.xml", |
| 15 "java/res/values-cs/generated_resources.xml", | 14 "java/res/values-cs/generated_resources.xml", |
| 16 "java/res/values-da/generated_resources.xml", | 15 "java/res/values-da/generated_resources.xml", |
| 17 "java/res/values-de/generated_resources.xml", | 16 "java/res/values-de/generated_resources.xml", |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 ] | 119 ] |
| 121 | 120 |
| 122 if (is_android) { | 121 if (is_android) { |
| 123 outputs += android_generated_java_resources | 122 outputs += android_generated_java_resources |
| 124 } | 123 } |
| 125 } | 124 } |
| 126 | 125 |
| 127 if (is_android) { | 126 if (is_android) { |
| 128 java_strings_grd_prebuilt("java_strings_grd") { | 127 java_strings_grd_prebuilt("java_strings_grd") { |
| 129 grit_output_dir = "$root_gen_dir/chrome/java/res" | 128 grit_output_dir = "$root_gen_dir/chrome/java/res" |
| 130 generated_files = rebase_path( | 129 generated_files = |
| 131 android_generated_java_resources, | 130 rebase_path(android_generated_java_resources, "java/res", ".") |
| 132 "java/res", | |
| 133 "." | |
| 134 ) | |
| 135 } | 131 } |
| 136 } | 132 } |
| 137 | 133 |
| 138 # GYP version: chrome/chrome_resources.gyp:chrome_strings_map | 134 # GYP version: chrome/chrome_resources.gyp:chrome_strings_map |
| 139 action("make_generated_resources_map") { | 135 action("make_generated_resources_map") { |
| 140 # Targets should depend on generated_resources_map instead. | 136 # Targets should depend on generated_resources_map instead. |
| 141 visibility = [ ":generated_resources_map" ] | 137 visibility = [ ":generated_resources_map" ] |
| 142 | 138 |
| 143 script = "//chrome/browser/metrics/variations/generate_resources_map.py" | 139 script = "//chrome/browser/metrics/variations/generate_resources_map.py" |
| 144 | 140 |
| 145 inputs = [ "$root_gen_dir/chrome/grit/generated_resources.h" ] | 141 inputs = [ |
| 142 "$root_gen_dir/chrome/grit/generated_resources.h", | |
|
tfarina
2014/12/03 18:36:15
this seems contradictory. Why would we format inpu
scottmg
2014/12/03 19:10:07
That seems reasonable to me: https://codereview.ch
| |
| 143 ] | |
| 146 outputs = [ "$root_gen_dir/chrome/generated_resources_map.cc" ] | 144 outputs = [ "$root_gen_dir/chrome/generated_resources_map.cc" ] |
| 147 | 145 |
| 148 args = rebase_path(inputs, root_build_dir) + | 146 args = |
| 149 rebase_path(outputs, root_build_dir) | 147 rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) |
| 150 | 148 |
| 151 deps = [ ":generated_resources" ] | 149 deps = [ |
| 150 ":generated_resources", | |
| 151 ] | |
| 152 } | 152 } |
| 153 | 153 |
| 154 # Collect the generated .cc file from make_generated_resources_map and put it | 154 # Collect the generated .cc file from make_generated_resources_map and put it |
| 155 # in a source set so targets that depend on it will link the source rather than | 155 # in a source set so targets that depend on it will link the source rather than |
| 156 # specifying it manually. This doesn't happen in the GYP build. | 156 # specifying it manually. This doesn't happen in the GYP build. |
| 157 source_set("generated_resources_map") { | 157 source_set("generated_resources_map") { |
| 158 sources = get_target_outputs(":make_generated_resources_map") | 158 sources = get_target_outputs(":make_generated_resources_map") |
| 159 } | 159 } |
| 160 | 160 |
| 161 # GYP version: chrome/chrome_resources.gyp:chrome_strings | 161 # GYP version: chrome/chrome_resources.gyp:chrome_strings |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 ] | 312 ] |
| 313 | 313 |
| 314 if (is_mac) { | 314 if (is_mac) { |
| 315 sources += [ | 315 sources += [ |
| 316 "chrome_breakpad_client.cc", | 316 "chrome_breakpad_client.cc", |
| 317 "chrome_breakpad_client_mac.mm", | 317 "chrome_breakpad_client_mac.mm", |
| 318 "chrome_main_mac.mm", | 318 "chrome_main_mac.mm", |
| 319 ] | 319 ] |
| 320 } | 320 } |
| 321 } | 321 } |
| OLD | NEW |