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

Side by Side Diff: components/resources/BUILD.gn

Issue 2670833004: Use a depfile to know when to regenerate notice files (Closed)
Patch Set: Created 3 years, 10 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
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 import("//printing/features/features.gni") 5 import("//printing/features/features.gni")
6 import("//tools/grit/grit_rule.gni") 6 import("//tools/grit/grit_rule.gni")
7 import("//third_party/brotli/brotli.gni") 7 import("//third_party/brotli/brotli.gni")
8 8
9 about_credits_file = "$target_gen_dir/about_credits.html" 9 about_credits_file = "$target_gen_dir/about_credits.html"
10 about_credits_file_bro = "$target_gen_dir/about_credits.bro" 10 about_credits_file_bro = "$target_gen_dir/about_credits.bro"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 compress_file_brotli("compressed_about_credits") { 57 compress_file_brotli("compressed_about_credits") {
58 input_file = about_credits_file 58 input_file = about_credits_file
59 output_file = about_credits_file_bro 59 output_file = about_credits_file_bro
60 deps = [ 60 deps = [
61 ":about_credits", 61 ":about_credits",
62 ] 62 ]
63 } 63 }
64 64
65 action("about_credits") { 65 action("about_credits") {
66 script = "//tools/licenses.py" 66 script = "//tools/licenses.py"
67 depfile = "$target_gen_dir/$target_name.d"
67 68
68 inputs = [ 69 inputs = [
69 # This is not a complete list. TODO(phajdan.jr, dbeam): licenses.py needs to
70 # generate a .d file with all the licenses/credits that about:credits uses.
71 # Then about:credits will automatically rebuild when one of them changes.
72 # See: depfile in gn's documentation (gn help depfile).
73 "../about_ui/resources/about_credits.tmpl", 70 "../about_ui/resources/about_credits.tmpl",
74 "../about_ui/resources/about_credits_entry.tmpl", 71 "../about_ui/resources/about_credits_entry.tmpl",
75 ] 72 ]
76 73
77 outputs = [ 74 outputs = [
78 about_credits_file, 75 about_credits_file,
79 ] 76 ]
80 77
81 args = [ 78 args = [
82 "--target-os=$target_os", 79 "--target-os=$target_os",
80 "--depfile",
81 rebase_path(depfile, root_build_dir),
83 "credits", 82 "credits",
84 rebase_path(about_credits_file, root_build_dir), 83 rebase_path(about_credits_file, root_build_dir),
85 ] 84 ]
86 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698