OLD | NEW |
---|---|
(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': | |
Mark Mentovai
2011/02/10 18:42:19
Everything in here that’s a path needs to be in a
Jakob Kummerow
2011/02/14 16:14:26
Done. (Except for 'proto_path_substr' which is use
| |
11 ['python', '../../tools/build/generate_policy_source.py'], | |
12 'policy_constant_header': '<(policy_out_dir)/policy/policy_constants.h', | |
13 'policy_constant_source': '<(policy_out_dir)/policy/policy_constants.cc', | |
14 'configuration_policy_type_header': | |
15 '<(policy_out_dir)/policy/configuration_policy_type.h', | |
16 'protobuf_decoder': '<(policy_out_dir)/policy/cloud_policy_generated.cc', | |
17 'cloud_policy_proto': '<(policy_out_dir)/policy/cloud_policy.proto', | |
18 'proto_path_substr': 'chrome/browser/policy/proto', | |
19 'proto_rel_path': '../../../<(proto_path_substr)', | |
20 }, | |
21 'targets': [ | |
22 { | |
23 'target_name': 'cloud_policy_code_generate', | |
24 'type': 'none', | |
25 'actions': [ | |
26 { | |
Mark Mentovai
2011/02/10 18:42:19
Weird indent here. It should only be two spaces in
Jakob Kummerow
2011/02/14 16:14:26
Done. I'm surprised that I didn't notice that myse
| |
27 'inputs': [ | |
28 'policy_templates.json', | |
29 '../../tools/build/generate_policy_source.py' | |
30 ], | |
31 'outputs': [ | |
32 '<(policy_constant_header)', | |
33 '<(policy_constant_source)', | |
34 '<(configuration_policy_type_header)', | |
35 '<(protobuf_decoder)', | |
36 '<(cloud_policy_proto)', | |
37 ], | |
38 'action_name': 'generate_policy_source', | |
39 'action': [ | |
40 '<@(generate_policy_source_script)', | |
41 '--policy-constants-header=<(policy_constant_header)', | |
42 '--policy-constants-source=<(policy_constant_source)', | |
43 '--policy-type-header=<(configuration_policy_type_header)', | |
44 '--policy-protobuf=<(cloud_policy_proto)', | |
45 '--protobuf-decoder=<(protobuf_decoder)', | |
46 '<(OS)', | |
47 'policy_templates.json', | |
48 ], | |
49 'message': 'Generating policy source', | |
50 }, | |
51 ], | |
52 'direct_dependent_settings': { | |
53 'include_dirs': [ | |
54 '<(policy_out_dir)', | |
55 '<(protoc_out_dir)', | |
56 ], | |
57 }, | |
Mark Mentovai
2011/02/10 18:42:19
Looks like this is where the weird indentation end
Jakob Kummerow
2011/02/14 16:14:26
Done.
| |
58 }, | |
59 { | |
60 'target_name': 'cloud_policy_proto_compile', | |
61 'type': 'none', | |
62 'actions': [ | |
63 { | |
64 'action_name': 'compile_generated_proto', | |
65 'inputs': [ | |
66 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
67 '<(policy_out_dir)/policy/cloud_policy.proto', | |
68 ], | |
69 'outputs': [ | |
70 '<(PRODUCT_DIR)/pyproto/device_management_pb/cloud_policy_pb2.py', | |
71 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.h', | |
72 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.cc', | |
73 ], | |
74 'action': [ | |
75 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
76 '--proto_path=<(policy_out_dir)/policy', | |
77 '<(policy_out_dir)/policy/cloud_policy.proto', | |
78 '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)', | |
79 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb', | |
80 ], | |
81 'message': 'Compiling generated cloud policy protobuf', | |
82 }, | |
83 ], | |
84 'dependencies': [ | |
85 '../../../third_party/protobuf/protobuf.gyp:protoc#host', | |
86 'cloud_policy_code_generate', | |
87 ], | |
88 'direct_dependent_settings': { | |
89 'include_dirs': [ | |
90 '<(protoc_out_dir)', | |
91 ] | |
92 }, | |
93 }, | |
94 { | |
95 'target_name': 'cloud_policy_backend_header_compile', | |
96 'type': 'none', | |
97 'sources': [ | |
98 '<(proto_rel_path)/device_management_backend.proto', | |
99 '<(proto_rel_path)/device_management_local.proto', | |
100 ], | |
101 'rules': [ | |
102 { | |
103 'rule_name': 'gen_proto', | |
104 'extension': 'proto', | |
105 'inputs': [ | |
106 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
107 ], | |
108 'outputs': [ | |
109 '<(PRODUCT_DIR)/pyproto/device_management_pb/<(RULE_INPUT_ROOT)_pb2. py', | |
110 '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.h', | |
111 '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.cc', | |
112 ], | |
113 'action': [ | |
114 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
115 '--proto_path=<(policy_out_dir)/policy', | |
116 '--proto_path=<(proto_rel_path)', | |
117 '<(proto_rel_path)/<(RULE_INPUT_NAME)', | |
118 '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)', | |
119 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb', | |
120 ], | |
121 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', | |
122 } | |
123 ], | |
124 'dependencies': [ | |
125 '../../../third_party/protobuf/protobuf.gyp:protoc#host', | |
126 'cloud_policy_proto_compile', | |
127 ], | |
128 'direct_dependent_settings': { | |
129 'include_dirs': [ | |
130 '<(protoc_out_dir)', | |
131 ] | |
132 }, | |
133 }, | |
134 { | |
135 'target_name': 'policy', | |
136 'type': '<(library)', | |
137 'hard_dependency': 1, | |
138 'direct_dependent_settings': { | |
139 'include_dirs': [ | |
140 '<(policy_out_dir)' | |
141 ], | |
142 }, | |
143 'sources': [ | |
144 '<(policy_constant_header)', | |
145 '<(policy_constant_source)', | |
146 '<(configuration_policy_type_header)', | |
147 '<(protobuf_decoder)', | |
148 ], | |
149 'include_dirs': [ | |
150 '../../..', | |
151 ], | |
152 'dependencies': [ | |
153 'cloud_policy_code_generate', | |
154 'cloud_policy_proto_compile', | |
155 'cloud_policy_backend_header_compile', | |
156 '../../../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
157 ], | |
158 }, | |
159 ], | |
160 'conditions': [ | |
161 ['OS=="win"', { | |
162 'targets': [ | |
163 { | |
164 'target_name': 'policy_win64', | |
165 'type': '<(library)', | |
166 'hard_dependency': 1, | |
167 'sources': [ | |
168 '<(policy_constant_header)', | |
169 '<(policy_constant_source)', | |
170 '<(configuration_policy_type_header)', | |
171 ], | |
172 'direct_dependent_settings': { | |
173 'include_dirs': [ | |
174 '<(policy_out_dir)' | |
175 ], | |
176 }, | |
177 'dependencies': [ | |
178 'cloud_policy_code_generate', | |
179 ], | |
180 'configurations': { | |
181 'Common_Base': { | |
182 'msvs_target_platform': 'x64', | |
183 }, | |
184 }, | |
185 }, | |
186 ], | |
187 }], | |
188 ], # 'conditions' | |
189 } | |
190 | |
191 # Local Variables: | |
192 # tab-width:2 | |
193 # indent-tabs-mode:nil | |
194 # End: | |
195 # vim: set expandtab tabstop=2 shiftwidth=2: | |
OLD | NEW |