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

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

Issue 6532019: New policy protobuf protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix one more leak 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
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 '<(DEPTH)/chrome/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': '<(DEPTH)/<(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 '<(DEPTH)/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 '<(DEPTH)/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 '<(protoc_out_dir)',
146 ],
147 },
148 'sources': [
149 '<(policy_constant_header_path)',
150 '<(policy_constant_source_path)',
151 '<(configuration_policy_type_header_path)',
152 '<(protobuf_decoder_path)',
153 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.h',
154 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.cc',
155 '<(DEPTH)/chrome/browser/policy/policy_map.h',
156 '<(DEPTH)/chrome/browser/policy/policy_map.cc',
157 ],
158 'include_dirs': [
159 '<(DEPTH)',
160 ],
161 'dependencies': [
162 'cloud_policy_code_generate',
163 'cloud_policy_proto_compile',
164 'cloud_policy_backend_header_compile',
165 '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
166 ],
167 },
168 ],
169 'conditions': [
170 ['OS=="win"', {
171 'targets': [
172 {
173 'target_name': 'policy_win64',
174 'type': '<(library)',
175 'hard_dependency': 1,
176 'sources': [
177 '<(policy_constant_header_path)',
178 '<(policy_constant_source_path)',
179 '<(configuration_policy_type_header_path)',
180 ],
181 'direct_dependent_settings': {
182 'include_dirs': [
183 '<(policy_out_dir)'
184 ],
185 },
186 'dependencies': [
187 'cloud_policy_code_generate',
188 ],
189 'configurations': {
190 'Common_Base': {
191 'msvs_target_platform': 'x64',
192 },
193 },
194 },
195 ],
196 }],
197 ], # 'conditions'
198 }
199
200 # Local Variables:
201 # tab-width:2
202 # indent-tabs-mode:nil
203 # End:
204 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « no previous file | chrome/app/policy/policy_templates.gypi » ('j') | chrome/browser/policy/cloud_policy_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698