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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 357 !invoker.use_qualified_include) { | 357 !invoker.use_qualified_include) { |
| 358 include_dirs = [ output_dir ] | 358 include_dirs = [ output_dir ] |
| 359 } | 359 } |
| 360 visibility = target_visibility | 360 visibility = target_visibility |
| 361 } | 361 } |
| 362 | 362 |
| 363 grit_custom_target = target_name + "_grit" | 363 grit_custom_target = target_name + "_grit" |
| 364 action(grit_custom_target) { | 364 action(grit_custom_target) { |
| 365 script = "//tools/grit/grit.py" | 365 script = "//tools/grit/grit.py" |
| 366 inputs = grit_inputs | 366 inputs = grit_inputs |
| 367 outputs = grit_outputs | 367 depend_on_stamp = |
|
cjhopman
2015/03/14 00:37:45
Do we need to support not depending on a stamp?
knn
2015/03/16 10:53:42
This only so that the build does not break due to
cjhopman
2015/03/16 20:13:46
But, we can't set depend_on_stamp for any target u
| |
| 368 depfile = "$output_dir/${grit_output_name}.d" | 368 defined(invoker.depend_on_stamp) && invoker.depend_on_stamp |
| 369 if (depend_on_stamp) { | |
| 370 # Need this for migrating existing targets without clobbering. | |
| 371 depfile = "$output_dir/${grit_output_name}_stamp.d" | |
| 372 outputs = [ | |
| 373 "${depfile}.stamp", | |
| 374 ] | |
| 375 } else { | |
| 376 depfile = "$output_dir/${grit_output_name}.d" | |
| 377 outputs = [] | |
| 378 } | |
| 379 outputs += grit_outputs | |
| 369 | 380 |
| 370 args = [ | 381 args = [ |
| 371 "-i", | 382 "-i", |
| 372 source_path, | 383 source_path, |
| 373 "build", | 384 "build", |
| 374 ] | 385 ] |
| 375 if (resource_ids != "") { | 386 if (resource_ids != "") { |
| 376 args += [ | 387 args += [ |
| 377 "-f", | 388 "-f", |
| 378 resource_ids, | 389 resource_ids, |
| 379 ] | 390 ] |
| 380 } | 391 } |
| 381 args += [ | 392 args += [ |
| 382 "-o", | 393 "-o", |
| 383 rebased_output_dir, | 394 rebased_output_dir, |
| 384 "--depdir", | 395 "--depdir", |
| 385 ".", | 396 ".", |
| 386 "--depfile", | 397 "--depfile", |
| 387 rebase_path(depfile, root_build_dir), | 398 rebase_path(depfile, root_build_dir), |
| 388 "--write-only-new=1", | 399 "--write-only-new=1", |
| 389 ] + grit_defines | 400 ] |
| 401 if (depend_on_stamp) { | |
| 402 args += [ "--depend-on-stamp" ] | |
| 403 } | |
| 404 args += grit_defines | |
| 390 | 405 |
| 391 # Add extra defines with -D flags. | 406 # Add extra defines with -D flags. |
| 392 if (defined(invoker.defines)) { | 407 if (defined(invoker.defines)) { |
| 393 foreach(i, invoker.defines) { | 408 foreach(i, invoker.defines) { |
| 394 args += [ | 409 args += [ |
| 395 "-D", | 410 "-D", |
| 396 i, | 411 i, |
| 397 ] | 412 ] |
| 398 } | 413 } |
| 399 } | 414 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 443 if (defined(invoker.configs)) { | 458 if (defined(invoker.configs)) { |
| 444 configs += invoker.configs | 459 configs += invoker.configs |
| 445 } | 460 } |
| 446 | 461 |
| 447 if (defined(invoker.visibility)) { | 462 if (defined(invoker.visibility)) { |
| 448 visibility = invoker.visibility | 463 visibility = invoker.visibility |
| 449 } | 464 } |
| 450 output_name = grit_output_name | 465 output_name = grit_output_name |
| 451 } | 466 } |
| 452 } | 467 } |
| OLD | NEW |