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

Side by Side Diff: content/browser/tracing/BUILD.gn

Issue 375873006: Rename source_prereqs to inputs in the GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/devtools/BUILD.gn ('k') | content/gpu/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 import("//tools/grit/grit_rule.gni") 5 import("//tools/grit/grit_rule.gni")
6 6
7 # generate_about_tracing puts its files in this directory 7 # generate_about_tracing puts its files in this directory
8 tracing_gen_dir = "$root_gen_dir/content/browser/tracing" 8 tracing_gen_dir = "$root_gen_dir/content/browser/tracing"
9 9
10 # The script just writes filename with no dirs to the .grd, so we always need 10 # The script just writes filename with no dirs to the .grd, so we always need
11 # this file to be in the same directory as the inputs. 11 # this file to be in the same directory as the inputs.
12 tracing_grd = "$tracing_gen_dir/tracing_resources.grd" 12 tracing_grd = "$tracing_gen_dir/tracing_resources.grd"
13 13
14 action("generate_tracing_grd") { 14 action("generate_tracing_grd") {
15 visibility = ":resources" 15 visibility = ":resources"
16 script = "generate_trace_viewer_grd.py" 16 script = "generate_trace_viewer_grd.py"
17 17
18 input_pages = [ 18 input_pages = [
19 "$tracing_gen_dir/about_tracing.html", 19 "$tracing_gen_dir/about_tracing.html",
20 "$tracing_gen_dir/about_tracing.js", 20 "$tracing_gen_dir/about_tracing.js",
21 ] 21 ]
22 source_prereqs = input_pages 22 inputs = input_pages
23 outputs = [ tracing_grd ] 23 outputs = [ tracing_grd ]
24 24
25 args = rebase_path(input_pages, target_gen_dir) + [ 25 args = rebase_path(input_pages, target_gen_dir) + [
26 "--output", rebase_path(tracing_grd, root_build_dir), 26 "--output", rebase_path(tracing_grd, root_build_dir),
27 ] 27 ]
28 28
29 deps = [ 29 deps = [
30 "//third_party/trace-viewer:generate_about_tracing", 30 "//third_party/trace-viewer:generate_about_tracing",
31 ] 31 ]
32 } 32 }
33 33
34 # This can't use the grit template because the grd file is generated at build 34 # This can't use the grit template because the grd file is generated at build
35 # time, so the trick of using grit_info to get the real inputs/outputs at GYP 35 # time, so the trick of using grit_info to get the real inputs/outputs at GYP
36 # time isn't possible. 36 # time isn't possible.
37 action("resources") { 37 action("resources") {
38 script = "//tools/grit/grit.py" 38 script = "//tools/grit/grit.py"
39 39
40 # Get the list of grit script sources. 40 # Get the list of grit script sources.
41 grit_inputs_build_rel = 41 grit_inputs_build_rel =
42 exec_script("//tools/grit/grit_info.py", [ "--inputs" ], "list lines") 42 exec_script("//tools/grit/grit_info.py", [ "--inputs" ], "list lines")
43 43
44 source_prereqs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [ 44 inputs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [
45 grit_resource_id_file, 45 grit_resource_id_file,
46 ] 46 ]
47 outputs = [ 47 outputs = [
48 "$target_gen_dir/grit/tracing_resources.h", 48 "$target_gen_dir/grit/tracing_resources.h",
49 "$target_gen_dir/tracing_resources.pak", 49 "$target_gen_dir/tracing_resources.pak",
50 ] 50 ]
51 51
52 args = [ 52 args = [
53 "-i", rebase_path(tracing_grd, root_build_dir), "build", 53 "-i", rebase_path(tracing_grd, root_build_dir), "build",
54 "-f", rebase_path(grit_resource_id_file, root_build_dir), 54 "-f", rebase_path(grit_resource_id_file, root_build_dir),
55 "-o", rebase_path(target_gen_dir, root_build_dir), 55 "-o", rebase_path(target_gen_dir, root_build_dir),
56 # resource_ids has an entry for our .grd file that looks like: 56 # resource_ids has an entry for our .grd file that looks like:
57 # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd" 57 # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd"
58 # and what we pass here should make that resolve to our .grd file. 58 # and what we pass here should make that resolve to our .grd file.
59 "-DSHARED_INTERMEDIATE_DIR=" + 59 "-DSHARED_INTERMEDIATE_DIR=" +
60 rebase_path(root_gen_dir, root_build_dir), 60 rebase_path(root_gen_dir, root_build_dir),
61 ] + grit_defines 61 ] + grit_defines
62 62
63 deps = [ 63 deps = [
64 ":generate_tracing_grd", 64 ":generate_tracing_grd",
65 ] 65 ]
66 } 66 }
OLDNEW
« no previous file with comments | « content/browser/devtools/BUILD.gn ('k') | content/gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698