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

Side by Side Diff: third_party/WebKit/Source/build/scripts/scripts.gni

Issue 2659283002: Convert CSSPrimitiveValueUnits.in to json5 format (Closed)
Patch Set: add deprecation notice to in_generator.py 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("//build/toolchain/toolchain.gni") 5 import("//build/toolchain/toolchain.gni")
6 import("//third_party/WebKit/Source/config.gni") 6 import("//third_party/WebKit/Source/config.gni")
7 7
8 # All paths in this file should be absolute so targets in any directory can use 8 # All paths in this file should be absolute so targets in any directory can use
9 # them without worrying about the current directory. 9 # them without worrying about the current directory.
10 _scripts_dir = "//third_party/WebKit/Source/build/scripts" 10 _scripts_dir = "//third_party/WebKit/Source/build/scripts"
11 11
12 scripts_for_in_files = [ 12 scripts_for_json5_files = [
13 # jinja2/__init__.py contains version string, so sufficient as 13 # jinja2/__init__.py contains version string, so sufficient as
14 # dependency for whole jinja2 package 14 # dependency for whole jinja2 package
15 "//third_party/jinja2/__init__.py", 15 "//third_party/jinja2/__init__.py",
16 "//third_party/markupsafe/__init__.py", # jinja2 dep 16 "//third_party/markupsafe/__init__.py", # jinja2 dep
17 "$_scripts_dir/hasher.py", 17 "$_scripts_dir/hasher.py",
18 "$_scripts_dir/in_file.py",
19 "$_scripts_dir/in_generator.py",
20 "$_scripts_dir/json5_generator.py", 18 "$_scripts_dir/json5_generator.py",
21 "$_scripts_dir/license.py", 19 "$_scripts_dir/license.py",
22 "$_scripts_dir/name_utilities.py", 20 "$_scripts_dir/name_utilities.py",
23 "$_scripts_dir/template_expander.py", 21 "$_scripts_dir/template_expander.py",
24 "$_scripts_dir/templates/macros.tmpl", 22 "$_scripts_dir/templates/macros.tmpl",
25 ] 23 ]
26 24
27 css_properties_files = 25 css_properties_files =
28 scripts_for_in_files + [ "$_scripts_dir/css_properties.py" ] 26 scripts_for_json5_files + [ "$_scripts_dir/css_properties.py" ]
29 27
30 make_event_factory_files = scripts_for_in_files + [ 28 make_event_factory_files = scripts_for_json5_files + [
31 "$_scripts_dir/make_event_factory.py", 29 "$_scripts_dir/make_event_factory.py",
32 "$_scripts_dir/templates/EventFactory.cpp.tmpl", 30 "$_scripts_dir/templates/EventFactory.cpp.tmpl",
33 ] 31 ]
34 32
35 make_names_files = scripts_for_in_files + [ 33 make_names_files = scripts_for_json5_files + [
36 "$_scripts_dir/make_names.py", 34 "$_scripts_dir/make_names.py",
37 "$_scripts_dir/templates/MakeNames.cpp.tmpl", 35 "$_scripts_dir/templates/MakeNames.cpp.tmpl",
38 "$_scripts_dir/templates/MakeNames.h.tmpl", 36 "$_scripts_dir/templates/MakeNames.h.tmpl",
39 ] 37 ]
40 38
41 make_qualified_names_files = 39 make_qualified_names_files =
42 scripts_for_in_files + [ 40 scripts_for_json5_files + [
43 "$_scripts_dir/make_qualified_names.py", 41 "$_scripts_dir/make_qualified_names.py",
44 "$_scripts_dir/templates/MakeQualifiedNames.cpp.tmpl", 42 "$_scripts_dir/templates/MakeQualifiedNames.cpp.tmpl",
45 "$_scripts_dir/templates/MakeQualifiedNames.h.tmpl", 43 "$_scripts_dir/templates/MakeQualifiedNames.h.tmpl",
46 ] 44 ]
47 45
48 make_element_factory_files = 46 make_element_factory_files =
49 make_qualified_names_files + [ 47 make_qualified_names_files + [
50 "$_scripts_dir/make_element_factory.py", 48 "$_scripts_dir/make_element_factory.py",
51 "$_scripts_dir/templates/ElementFactory.cpp.tmpl", 49 "$_scripts_dir/templates/ElementFactory.cpp.tmpl",
52 "$_scripts_dir/templates/ElementFactory.h.tmpl", 50 "$_scripts_dir/templates/ElementFactory.h.tmpl",
53 ] 51 ]
54 52
55 make_element_type_helpers_files = 53 make_element_type_helpers_files =
56 make_qualified_names_files + [ 54 make_qualified_names_files + [
57 "$_scripts_dir/make_element_type_helpers.py", 55 "$_scripts_dir/make_element_type_helpers.py",
58 "$_scripts_dir/templates/ElementTypeHelpers.cpp.tmpl", 56 "$_scripts_dir/templates/ElementTypeHelpers.cpp.tmpl",
59 "$_scripts_dir/templates/ElementTypeHelpers.h.tmpl", 57 "$_scripts_dir/templates/ElementTypeHelpers.h.tmpl",
60 ] 58 ]
61 59
62 make_trie_helpers_files = 60 make_trie_helpers_files =
63 scripts_for_in_files + [ "$_scripts_dir/trie_builder.py" ] 61 scripts_for_json5_files + [ "$_scripts_dir/trie_builder.py" ]
64 62
65 # The executables are relative to the build directory. Don't rebase it because 63 # The executables are relative to the build directory. Don't rebase it because
66 # on Posix we want to run the system one on the path. 64 # on Posix we want to run the system one on the path.
67 if (host_os == "win") { 65 if (host_os == "win") {
68 gperf_exe = rebase_path("//third_party/gperf/bin/gperf.exe", root_build_dir) 66 gperf_exe = rebase_path("//third_party/gperf/bin/gperf.exe", root_build_dir)
69 bison_exe = rebase_path("//third_party/bison/bin/bison.exe", root_build_dir) 67 bison_exe = rebase_path("//third_party/bison/bin/bison.exe", root_build_dir)
70 } else { 68 } else {
71 gperf_exe = "gperf" 69 gperf_exe = "gperf"
72 bison_exe = "bison" 70 bison_exe = "bison"
73 } 71 }
74 72
75 # Templates -------------------------------------------------------------------- 73 # Templates --------------------------------------------------------------------
76 74
77 _blink_gen_dir = "$root_gen_dir/blink" 75 _blink_gen_dir = "$root_gen_dir/blink"
78 76
79 make_core_generated_deps = [ 77 make_core_generated_deps = [
80 "//third_party/WebKit/Source/core:generated_testing_idls", 78 "//third_party/WebKit/Source/core:generated_testing_idls",
81 "//third_party/WebKit/Source/core:core_event_interfaces", 79 "//third_party/WebKit/Source/core:core_event_interfaces",
82 ] 80 ]
83 81
84 # Template to run most of scripts that process "*.in" files. 82 # Template to run most of scripts that process "*.in" files.
85 # script: script to run. 83 # script: script to run.
86 # in_files: ".in" files to pass to the script 84 # in_files: ".in" files to pass to the script
87 # other_inputs: (optional) other input files the script depends on 85 # other_inputs: (optional) other input files the script depends on
88 # defaults to "scripts_for_in_files" (if specified, we assume 86 # defaults to "scripts_for_json5_files" (if specified, we assume
89 # that the contents of "scripts_for_in_files" are included in 87 # that the contents of "scripts_for_json5_files" are included in
90 # this list). 88 # this list).
91 # outputs: expected results. Note that the directory of the 0th item in this 89 # outputs: expected results. Note that the directory of the 0th item in this
92 # list will be taken to be the output path. 90 # list will be taken to be the output path.
93 # other_args: (optional) other arguments to pass to the script. 91 # other_args: (optional) other arguments to pass to the script.
94 # deps [optional]: 92 # deps [optional]:
95 # Depenendencies. If unspecified defaults to make_core_generated_deps. 93 # Depenendencies. If unspecified defaults to make_core_generated_deps.
96 template("process_in_files") { 94 template("process_in_files") {
97 action(target_name) { 95 action(target_name) {
98 script = invoker.script 96 script = invoker.script
99 97
100 inputs = invoker.in_files 98 inputs = invoker.in_files
101 if (defined(invoker.other_inputs)) { 99 if (defined(invoker.other_inputs)) {
102 inputs += invoker.other_inputs 100 inputs += invoker.other_inputs
103 } else { 101 } else {
104 inputs += scripts_for_in_files 102 inputs += scripts_for_json5_files
105 } 103 }
106 outputs = invoker.outputs 104 outputs = invoker.outputs
107 105
108 # Extract the directory to write files to. 106 # Extract the directory to write files to.
109 output_dir = get_path_info(outputs[0], "dir") 107 output_dir = get_path_info(outputs[0], "dir")
110 108
111 args = rebase_path(invoker.in_files, root_build_dir) + [ 109 args = rebase_path(invoker.in_files, root_build_dir) + [
112 "--output_dir", 110 "--output_dir",
113 rebase_path(output_dir, root_build_dir), 111 rebase_path(output_dir, root_build_dir),
114 ] 112 ]
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 other_inputs = make_event_factory_files 194 other_inputs = make_event_factory_files
197 forward_variables_from(invoker, 195 forward_variables_from(invoker,
198 [ 196 [
199 "deps", 197 "deps",
200 "in_files", 198 "in_files",
201 "outputs", 199 "outputs",
202 "visibility", 200 "visibility",
203 ]) 201 ])
204 } 202 }
205 } 203 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/build/scripts/make_cssom_types.py ('k') | third_party/WebKit/Source/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698