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 # 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 306 assert(defined(invoker.source), | 306 assert(defined(invoker.source), |
| 307 "\"source\" must be defined for the grit template $target_name") | 307 "\"source\" must be defined for the grit template $target_name") |
| 308 | 308 |
| 309 grit_inputs = [ invoker.source ] | 309 grit_inputs = [ invoker.source ] |
| 310 | 310 |
| 311 if (defined(invoker.resource_ids)) { | 311 if (defined(invoker.resource_ids)) { |
| 312 resource_ids = invoker.resource_ids | 312 resource_ids = invoker.resource_ids |
| 313 } else { | 313 } else { |
| 314 resource_ids = grit_resource_id_file | 314 resource_ids = grit_resource_id_file |
| 315 } | 315 } |
| 316 grit_inputs += [ resource_ids ] # Script depends on ID file. | 316 if (resource_ids != "") { |
| 317 # Script depends on ID file. Don't depend on "" if it's the empty string. | |
|
cjhopman
2015/05/28 18:40:44
s/on "" if/on resource_ids if/ ? Sentence is kinda
| |
| 318 grit_inputs += [ resource_ids ] | |
| 319 } | |
| 317 | 320 |
| 318 if (defined(invoker.output_dir)) { | 321 if (defined(invoker.output_dir)) { |
| 319 output_dir = invoker.output_dir | 322 output_dir = invoker.output_dir |
| 320 } else { | 323 } else { |
| 321 output_dir = target_gen_dir | 324 output_dir = target_gen_dir |
| 322 } | 325 } |
| 323 | 326 |
| 324 if (defined(invoker.output_name)) { | 327 if (defined(invoker.output_name)) { |
| 325 grit_output_name = invoker.output_name | 328 grit_output_name = invoker.output_name |
| 326 } else { | 329 } else { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 if (defined(invoker.configs)) { | 464 if (defined(invoker.configs)) { |
| 462 configs += invoker.configs | 465 configs += invoker.configs |
| 463 } | 466 } |
| 464 | 467 |
| 465 if (defined(invoker.visibility)) { | 468 if (defined(invoker.visibility)) { |
| 466 visibility = invoker.visibility | 469 visibility = invoker.visibility |
| 467 } | 470 } |
| 468 output_name = grit_output_name | 471 output_name = grit_output_name |
| 469 } | 472 } |
| 470 } | 473 } |
| OLD | NEW |