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

Side by Side Diff: build/json_schema_compile.gypi

Issue 513633002: Reland 596ff54335b2a1b393af10657bc4945114f3beed - Split API bundle generation steps (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 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/json_schema_bundle_registration_compile.gypi ('k') | chrome/browser/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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 { 5 {
6 'variables': { 6 'variables': {
7 # When including this gypi, the following variables must be set: 7 # When including this gypi, the following variables must be set:
8 # schema_files: 8 # schema_files:
9 # An array of json or idl files that comprise the api model. 9 # An array of json or idl files that comprise the api model.
10 # cc_dir: 10 # cc_dir:
11 # The directory to put the generated code in. 11 # The directory to put the generated code in.
12 # root_namespace: 12 # root_namespace:
13 # A Python string substituion pattern used to generate the C++ 13 # A Python string substituion pattern used to generate the C++
14 # namespace for each API. Use %(namespace)s to replace with the API 14 # namespace for each API. Use %(namespace)s to replace with the API
15 # namespace, like "toplevel::%(namespace)s_api". 15 # namespace, like "toplevel::%(namespace)s_api".
16 # 16 #
17 # Functions and namespaces can be excluded by setting "nocompile" to true. 17 # Functions and namespaces can be excluded by setting "nocompile" to true.
18 # The default root path of API implementation sources is
19 # chrome/browser/extensions/api and can be overridden by setting "impl_dir".
20 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler', 18 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
21 'api_gen': '<(api_gen_dir)/compiler.py', 19 'api_gen': '<(api_gen_dir)/compiler.py',
22 'impl_dir%': 'chrome/browser/extensions/api',
23 }, 20 },
24 'rules': [ 21 'rules': [
25 { 22 {
26 # GN version: //extensions/generated_extensions_api.gni 23 # GN version: //extensions/generated_extensions_api.gni
27 'rule_name': 'genapi', 24 'rule_name': 'genapi',
28 'msvs_external_rule': 1, 25 'msvs_external_rule': 1,
29 'extension': 'json', 26 'extension': 'json',
30 'inputs': [ 27 'inputs': [
31 '<(api_gen_dir)/cc_generator.py', 28 '<(api_gen_dir)/cc_generator.py',
32 '<(api_gen_dir)/code.py', 29 '<(api_gen_dir)/code.py',
(...skipping 17 matching lines...) Expand all
50 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT _ROOT).h', 47 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT _ROOT).h',
51 ], 48 ],
52 'action': [ 49 'action': [
53 'python', 50 'python',
54 '<(api_gen)', 51 '<(api_gen)',
55 '<(RULE_INPUT_PATH)', 52 '<(RULE_INPUT_PATH)',
56 '--root=<(DEPTH)', 53 '--root=<(DEPTH)',
57 '--destdir=<(SHARED_INTERMEDIATE_DIR)', 54 '--destdir=<(SHARED_INTERMEDIATE_DIR)',
58 '--namespace=<(root_namespace)', 55 '--namespace=<(root_namespace)',
59 '--generator=cpp', 56 '--generator=cpp',
60 '--impl-dir=<(impl_dir)'
61 ], 57 ],
62 'message': 'Generating C++ code from <(RULE_INPUT_PATH) json files', 58 'message': 'Generating C++ code from <(RULE_INPUT_PATH) json files',
63 'process_outputs_as_sources': 1, 59 'process_outputs_as_sources': 1,
64 }, 60 },
65 { 61 {
66 'rule_name': 'genapi_idl', 62 'rule_name': 'genapi_idl',
67 'msvs_external_rule': 1, 63 'msvs_external_rule': 1,
68 'extension': 'idl', 64 'extension': 'idl',
69 'inputs': [ 65 'inputs': [
70 '<(api_gen_dir)/cc_generator.py', 66 '<(api_gen_dir)/cc_generator.py',
(...skipping 18 matching lines...) Expand all
89 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT _ROOT).h', 85 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT _ROOT).h',
90 ], 86 ],
91 'action': [ 87 'action': [
92 'python', 88 'python',
93 '<(api_gen)', 89 '<(api_gen)',
94 '<(RULE_INPUT_PATH)', 90 '<(RULE_INPUT_PATH)',
95 '--root=<(DEPTH)', 91 '--root=<(DEPTH)',
96 '--destdir=<(SHARED_INTERMEDIATE_DIR)', 92 '--destdir=<(SHARED_INTERMEDIATE_DIR)',
97 '--namespace=<(root_namespace)', 93 '--namespace=<(root_namespace)',
98 '--generator=cpp', 94 '--generator=cpp',
99 '--impl-dir=<(impl_dir)'
100 ], 95 ],
101 'message': 'Generating C++ code from <(RULE_INPUT_PATH) IDL files', 96 'message': 'Generating C++ code from <(RULE_INPUT_PATH) IDL files',
102 'process_outputs_as_sources': 1, 97 'process_outputs_as_sources': 1,
103 }, 98 },
104 ], 99 ],
105 'include_dirs': [ 100 'include_dirs': [
106 '<(SHARED_INTERMEDIATE_DIR)', 101 '<(SHARED_INTERMEDIATE_DIR)',
107 '<(DEPTH)', 102 '<(DEPTH)',
108 ], 103 ],
109 'dependencies':[ 104 'dependencies':[
110 '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util', 105 '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util',
111 ], 106 ],
112 'direct_dependent_settings': { 107 'direct_dependent_settings': {
113 'include_dirs': [ 108 'include_dirs': [
114 '<(SHARED_INTERMEDIATE_DIR)', 109 '<(SHARED_INTERMEDIATE_DIR)',
115 ] 110 ]
116 }, 111 },
117 # This target exports a hard dependency because it generates header 112 # This target exports a hard dependency because it generates header
118 # files. 113 # files.
119 'hard_dependency': 1, 114 'hard_dependency': 1,
120 } 115 }
OLDNEW
« no previous file with comments | « build/json_schema_bundle_registration_compile.gypi ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698