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

Side by Side Diff: chrome/app/policy/cloud_policy_codegen.gyp

Issue 6409040: New policy protobuf protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/app/policy/policy_templates.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6 'variables': {
7 'chromium_code': 1,
8 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy',
9 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
10 'generate_policy_source_script_path':
11 '../../tools/build/generate_policy_source.py',
12 'policy_constant_header_path':
13 '<(policy_out_dir)/policy/policy_constants.h',
14 'policy_constant_source_path':
15 '<(policy_out_dir)/policy/policy_constants.cc',
16 'configuration_policy_type_header_path':
17 '<(policy_out_dir)/policy/configuration_policy_type.h',
18 'protobuf_decoder_path':
19 '<(policy_out_dir)/policy/cloud_policy_generated.cc',
20 'cloud_policy_proto_path': '<(policy_out_dir)/policy/cloud_policy.proto',
21 'proto_path_substr': 'chrome/browser/policy/proto',
22 'proto_rel_path': '../../../<(proto_path_substr)',
23 },
24 'targets': [
25 {
26 'target_name': 'cloud_policy_code_generate',
27 'type': 'none',
28 'actions': [
29 {
30 'inputs': [
31 'policy_templates.json',
32 '<(generate_policy_source_script_path)',
33 ],
34 'outputs': [
35 '<(policy_constant_header_path)',
36 '<(policy_constant_source_path)',
37 '<(configuration_policy_type_header_path)',
38 '<(protobuf_decoder_path)',
39 '<(cloud_policy_proto_path)',
40 ],
41 'action_name': 'generate_policy_source',
42 'action': [
43 'python',
44 '<@(generate_policy_source_script_path)',
45 '--policy-constants-header=<(policy_constant_header_path)',
46 '--policy-constants-source=<(policy_constant_source_path)',
47 '--policy-type-header=<(configuration_policy_type_header_path)',
48 '--policy-protobuf=<(cloud_policy_proto_path)',
49 '--protobuf-decoder=<(protobuf_decoder_path)',
50 '<(OS)',
51 'policy_templates.json',
52 ],
53 'message': 'Generating policy source',
54 },
55 ],
56 'direct_dependent_settings': {
57 'include_dirs': [
58 '<(policy_out_dir)',
59 '<(protoc_out_dir)',
60 ],
61 },
62 },
63 {
64 'target_name': 'cloud_policy_proto_compile',
65 'type': 'none',
66 'actions': [
67 {
68 'action_name': 'compile_generated_proto',
69 'inputs': [
70 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
71 '<(policy_out_dir)/policy/cloud_policy.proto',
72 ],
73 'outputs': [
74 '<(PRODUCT_DIR)/pyproto/device_management_pb/cloud_policy_pb2.py',
75 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.h',
76 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.cc',
77 ],
78 'action': [
79 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
80 '--proto_path=<(policy_out_dir)/policy',
81 '<(policy_out_dir)/policy/cloud_policy.proto',
82 '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)',
83 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb',
84 ],
85 'message': 'Compiling generated cloud policy protobuf',
86 },
87 ],
88 'dependencies': [
89 '../../../third_party/protobuf/protobuf.gyp:protoc#host',
90 'cloud_policy_code_generate',
91 ],
92 'direct_dependent_settings': {
93 'include_dirs': [
94 '<(protoc_out_dir)',
95 ]
96 },
97 },
98 {
99 'target_name': 'cloud_policy_backend_header_compile',
100 'type': 'none',
101 'sources': [
102 '<(proto_rel_path)/device_management_backend.proto',
103 '<(proto_rel_path)/device_management_local.proto',
104 ],
105 'rules': [
106 {
107 'rule_name': 'gen_proto',
108 'extension': 'proto',
109 'inputs': [
110 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
111 ],
112 'outputs': [
113 '<(PRODUCT_DIR)/pyproto/device_management_pb/<(RULE_INPUT_ROOT)_pb2. py',
114 '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.h',
115 '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.cc',
116 ],
117 'action': [
118 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
119 '--proto_path=<(policy_out_dir)/policy',
120 '--proto_path=<(proto_rel_path)',
121 '<(proto_rel_path)/<(RULE_INPUT_NAME)',
122 '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)',
123 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb',
124 ],
125 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
126 }
127 ],
128 'dependencies': [
129 '../../../third_party/protobuf/protobuf.gyp:protoc#host',
130 'cloud_policy_proto_compile',
131 ],
132 'direct_dependent_settings': {
133 'include_dirs': [
134 '<(protoc_out_dir)',
135 ]
136 },
137 },
138 {
139 'target_name': 'policy',
140 'type': '<(library)',
141 'hard_dependency': 1,
142 'direct_dependent_settings': {
143 'include_dirs': [
144 '<(policy_out_dir)'
145 ],
146 },
147 'sources': [
148 '<(policy_constant_header_path)',
149 '<(policy_constant_source_path)',
150 '<(configuration_policy_type_header_path)',
151 '<(protobuf_decoder_path)',
152 ],
153 'include_dirs': [
154 '../../..',
155 ],
156 'dependencies': [
157 'cloud_policy_code_generate',
158 'cloud_policy_proto_compile',
159 'cloud_policy_backend_header_compile',
160 '../../../third_party/protobuf/protobuf.gyp:protobuf_lite',
161 ],
162 },
163 ],
164 'conditions': [
165 ['OS=="win"', {
166 'targets': [
167 {
168 'target_name': 'policy_win64',
169 'type': '<(library)',
170 'hard_dependency': 1,
171 'sources': [
172 '<(policy_constant_header_path)',
173 '<(policy_constant_source_path)',
174 '<(configuration_policy_type_header_path)',
175 ],
176 'direct_dependent_settings': {
177 'include_dirs': [
178 '<(policy_out_dir)'
179 ],
180 },
181 'dependencies': [
182 'cloud_policy_code_generate',
183 ],
184 'configurations': {
185 'Common_Base': {
186 'msvs_target_platform': 'x64',
187 },
188 },
189 },
190 ],
191 }],
192 ], # 'conditions'
193 }
194
195 # Local Variables:
196 # tab-width:2
197 # indent-tabs-mode:nil
198 # End:
199 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « no previous file | chrome/app/policy/policy_templates.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698