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

Side by Side Diff: build/json_schema_api.gni

Issue 2257003002: [Extensions] Generate all schema resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready Created 4 years, 4 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 | « no previous file | chrome/BUILD.gn » ('j') | chrome/common/extensions/chrome_extensions_client.cc » ('J')
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 # Defines a static library corresponding to the output of schema compiler tools 5 # Defines a static library corresponding to the output of schema compiler tools
6 # over a set of extensions API schemas (IDL or JSON format.) The library target 6 # over a set of extensions API schemas (IDL or JSON format.) The library target
7 # has implicit hard dependencies on all schema files listed by the invoker and 7 # has implicit hard dependencies on all schema files listed by the invoker and
8 # is itself a hard dependency. 8 # is itself a hard dependency.
9 # 9 #
10 # Invocations of this template may use the following variables: 10 # Invocations of this template may use the following variables:
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 if (bundle) { 133 if (bundle) {
134 assert(defined(invoker.bundle_name), 134 assert(defined(invoker.bundle_name),
135 "\"bundle_name\" must be defined for bundles") 135 "\"bundle_name\" must be defined for bundles")
136 136
137 uncompiled_sources = [] 137 uncompiled_sources = []
138 if (defined(invoker.uncompiled_sources)) { 138 if (defined(invoker.uncompiled_sources)) {
139 uncompiled_sources = invoker.uncompiled_sources 139 uncompiled_sources = invoker.uncompiled_sources
140 } 140 }
141 141
142 uncompiled_bundle_schema_sources = []
lazyboy 2016/08/19 02:03:30 Do you need to describe what "uncompiled_bundle_sc
Devlin 2016/08/19 17:55:30 Done.
143 if (defined(invoker.uncompiled_bundle_schema_sources)) {
144 uncompiled_bundle_schema_sources =
145 invoker.uncompiled_bundle_schema_sources
146 }
147
142 bundle_generator_schema_name = target_name + "_bundle_generator_schema" 148 bundle_generator_schema_name = target_name + "_bundle_generator_schema"
143 action(bundle_generator_schema_name) { 149 action(bundle_generator_schema_name) {
144 script = compiler_script 150 script = compiler_script
145 inputs = compiler_sources + invoker.sources + uncompiled_sources 151 inputs = compiler_sources + invoker.sources + uncompiled_sources
146 outputs = [ 152 outputs = [
147 "$target_gen_dir/generated_schemas.cc", 153 "$target_gen_dir/generated_schemas.cc",
148 "$target_gen_dir/generated_schemas.h", 154 "$target_gen_dir/generated_schemas.h",
149 ] 155 ]
150 args = [ 156 args = [
151 "--root=" + rebase_path("//", root_build_dir), 157 "--root=" + rebase_path("//", root_build_dir),
152 "--destdir=" + rebase_path(root_gen_dir, root_build_dir), 158 "--destdir=" + rebase_path(root_gen_dir, root_build_dir),
153 "--namespace=$root_namespace", 159 "--namespace=$root_namespace",
154 "--bundle-name=" + invoker.bundle_name, 160 "--bundle-name=" + invoker.bundle_name,
155 "--generator=cpp-bundle-schema", 161 "--generator=cpp-bundle-schema",
156 "--include-rules=$schema_include_rules", 162 "--include-rules=$schema_include_rules",
157 ] + rebase_path(invoker.sources, root_build_dir) + 163 ] + rebase_path(invoker.sources, root_build_dir) +
158 rebase_path(uncompiled_sources, root_build_dir) 164 rebase_path(uncompiled_sources, root_build_dir) +
165 rebase_path(uncompiled_bundle_schema_sources, root_build_dir)
159 } 166 }
160 } 167 }
161 168
162 if (bundle_registration) { 169 if (bundle_registration) {
163 assert(defined(invoker.bundle_name), 170 assert(defined(invoker.bundle_name),
164 "\"bundle_name\" must be defined for bundle registrations") 171 "\"bundle_name\" must be defined for bundle registrations")
165 172
166 uncompiled_sources = [] 173 uncompiled_sources = []
167 if (defined(invoker.uncompiled_sources)) { 174 if (defined(invoker.uncompiled_sources)) {
168 uncompiled_sources = invoker.uncompiled_sources 175 uncompiled_sources = invoker.uncompiled_sources
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 public_configs = [ ":$generated_config_name" ] 241 public_configs = [ ":$generated_config_name" ]
235 242
236 if (defined(invoker.visibility)) { 243 if (defined(invoker.visibility)) {
237 visibility = invoker.visibility 244 visibility = invoker.visibility
238 } 245 }
239 if (defined(invoker.output_name)) { 246 if (defined(invoker.output_name)) {
240 output_name = invoker.output_name 247 output_name = invoker.output_name
241 } 248 }
242 } 249 }
243 } 250 }
OLDNEW
« no previous file with comments | « no previous file | chrome/BUILD.gn » ('j') | chrome/common/extensions/chrome_extensions_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698