| 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 # Instantiate grit. This will produce a script target to run grit, and a | 5 # Instantiate grit. This will produce a script target to run grit, and a |
| 6 # static library that compiles the .cc files. | 6 # static library that compiles the .cc files. |
| 7 # | 7 # |
| 8 # Parameters | 8 # Parameters |
| 9 # | 9 # |
| 10 # source (required) | 10 # source (required) |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 275 |
| 276 grit_custom_target = target_name + "_grit" | 276 grit_custom_target = target_name + "_grit" |
| 277 action(grit_custom_target) { | 277 action(grit_custom_target) { |
| 278 script = "//tools/grit/grit.py" | 278 script = "//tools/grit/grit.py" |
| 279 inputs = grit_inputs | 279 inputs = grit_inputs |
| 280 outputs = grit_outputs | 280 outputs = grit_outputs |
| 281 depfile = "$output_dir/${grit_output_name}.d" | 281 depfile = "$output_dir/${grit_output_name}.d" |
| 282 | 282 |
| 283 args = [ | 283 args = [ |
| 284 "-i", source_path, "build", | 284 "-i", source_path, "build", |
| 285 "-f", resource_ids, | 285 ] |
| 286 if (resource_ids != "") { |
| 287 args += [ "-f", resource_ids ] |
| 288 } |
| 289 args += [ |
| 286 "-o", rebased_output_dir, | 290 "-o", rebased_output_dir, |
| 287 "--depdir", ".", | 291 "--depdir", ".", |
| 288 "--depfile", rebase_path(depfile, root_build_dir), | 292 "--depfile", rebase_path(depfile, root_build_dir), |
| 289 ] + grit_defines | 293 ] + grit_defines |
| 290 | 294 |
| 291 # Add extra defines with -D flags. | 295 # Add extra defines with -D flags. |
| 292 if (defined(invoker.defines)) { | 296 if (defined(invoker.defines)) { |
| 293 foreach (i, invoker.defines) { | 297 foreach (i, invoker.defines) { |
| 294 args += [ "-D", i ] | 298 args += [ "-D", i ] |
| 295 } | 299 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 316 # target rather than this library. | 320 # target rather than this library. |
| 317 deps = [ ":$grit_custom_target" ] | 321 deps = [ ":$grit_custom_target" ] |
| 318 direct_dependent_configs = [ ":$grit_config" ] | 322 direct_dependent_configs = [ ":$grit_config" ] |
| 319 | 323 |
| 320 if (defined(invoker.visibility)) { | 324 if (defined(invoker.visibility)) { |
| 321 visibility = invoker.visibility | 325 visibility = invoker.visibility |
| 322 } | 326 } |
| 323 output_name = grit_output_name | 327 output_name = grit_output_name |
| 324 } | 328 } |
| 325 } | 329 } |
| OLD | NEW |