Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: build/secondary/tools/grit/grit_rule.gni

Issue 1030383003: Enable depend on stamp by default for all GN based grit targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/gyp/util/build_utils.py ('k') | components/policy/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 include_dirs = [ output_dir ] 364 include_dirs = [ output_dir ]
365 } 365 }
366 visibility = target_visibility 366 visibility = target_visibility
367 } 367 }
368 368
369 grit_custom_target = target_name + "_grit" 369 grit_custom_target = target_name + "_grit"
370 action(grit_custom_target) { 370 action(grit_custom_target) {
371 script = "//tools/grit/grit.py" 371 script = "//tools/grit/grit.py"
372 inputs = grit_inputs 372 inputs = grit_inputs
373 373
374 # TODO(knn): Remove this once grit has rolled to recognize the flag. 374 depfile = "$output_dir/${grit_output_name}_stamp.d"
375 depend_on_stamp = 375 outputs = [ "${depfile}.stamp" ] + grit_outputs
376 defined(invoker.depend_on_stamp) && invoker.depend_on_stamp
377 if (depend_on_stamp) {
378 # Need this for migrating existing targets without clobbering.
379 depfile = "$output_dir/${grit_output_name}_stamp.d"
380 outputs = [
381 "${depfile}.stamp",
382 ]
383 } else {
384 depfile = "$output_dir/${grit_output_name}.d"
385 outputs = []
386 }
387 outputs += grit_outputs
388 376
389 args = [ 377 args = [
390 "-i", 378 "-i",
391 source_path, 379 source_path,
392 "build", 380 "build",
393 ] 381 ]
394 if (resource_ids != "") { 382 if (resource_ids != "") {
395 args += [ 383 args += [
396 "-f", 384 "-f",
397 resource_ids, 385 resource_ids,
398 ] 386 ]
399 } 387 }
400 args += [ 388 args += [
401 "-o", 389 "-o",
402 rebased_output_dir, 390 rebased_output_dir,
403 "--depdir", 391 "--depdir",
404 ".", 392 ".",
405 "--depfile", 393 "--depfile",
406 rebase_path(depfile, root_build_dir), 394 rebase_path(depfile, root_build_dir),
407 "--write-only-new=1", 395 "--write-only-new=1",
408 ] 396 "--depend-on-stamp",
409 if (depend_on_stamp) { 397 ] + grit_defines
410 args += [ "--depend-on-stamp" ]
411 }
412 args += grit_defines
413 398
414 # Add extra defines with -D flags. 399 # Add extra defines with -D flags.
415 if (defined(invoker.defines)) { 400 if (defined(invoker.defines)) {
416 foreach(i, invoker.defines) { 401 foreach(i, invoker.defines) {
417 args += [ 402 args += [
418 "-D", 403 "-D",
419 i, 404 i,
420 ] 405 ]
421 } 406 }
422 } 407 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 if (defined(invoker.configs)) { 451 if (defined(invoker.configs)) {
467 configs += invoker.configs 452 configs += invoker.configs
468 } 453 }
469 454
470 if (defined(invoker.visibility)) { 455 if (defined(invoker.visibility)) {
471 visibility = invoker.visibility 456 visibility = invoker.visibility
472 } 457 }
473 output_name = grit_output_name 458 output_name = grit_output_name
474 } 459 }
475 } 460 }
OLDNEW
« no previous file with comments | « build/android/gyp/util/build_utils.py ('k') | components/policy/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698