OLD | NEW |
---|---|
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 'chromium_code': 1, | |
7 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', | 8 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', |
9 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', | |
8 'generate_policy_source_script': | 10 'generate_policy_source_script': |
9 ['python', 'tools/build/generate_policy_source.py'], | 11 ['python', 'tools/build/generate_policy_source.py'], |
10 }, | 12 }, |
11 'target_defaults': { | 13 'target_defaults': { |
12 'variables': { | 14 'variables': { |
13 'policy_target': 0, | 15 'policy_target': 0, |
14 }, | 16 }, |
15 'target_conditions': [ | 17 'target_conditions': [ |
16 [ 'policy_target==1', { | 18 [ 'policy_target==1', { |
17 'include_dirs': [ | 19 'include_dirs': [ |
18 '<(policy_out_dir)', | 20 '<(policy_out_dir)', |
21 '<(protoc_out_dir)', | |
22 '../../..', | |
19 ], | 23 ], |
20 'actions': [ | 24 'actions': [ |
21 { | 25 { |
22 'variables': | 26 'variables': |
23 { | 27 { |
24 'policy_constant_header': | 28 'policy_constant_header': |
25 '<(policy_out_dir)/policy/policy_constants.h', | 29 '<(policy_out_dir)/policy/policy_constants.h', |
26 'policy_constant_source': | 30 'policy_constant_source': |
27 '<(policy_out_dir)/policy/policy_constants.cc', | 31 '<(policy_out_dir)/policy/policy_constants.cc', |
28 'configuration_policy_type_header': | 32 'configuration_policy_type_header': |
29 '<(policy_out_dir)/policy/configuration_policy_type.h', | 33 '<(policy_out_dir)/policy/configuration_policy_type.h', |
34 'protobuf_decoder': | |
35 '<(policy_out_dir)/policy/cloud_policy_generated.cc', | |
30 }, | 36 }, |
31 'inputs': [ | 37 'inputs': [ |
32 'policy_templates.json', | 38 'policy_templates.json', |
33 '../../tools/build/generate_policy_source.py' | 39 '../../tools/build/generate_policy_source.py' |
34 ], | 40 ], |
35 'outputs': [ | 41 'outputs': [ |
36 '<(policy_constant_header)', | 42 '<(policy_constant_header)', |
37 '<(policy_constant_source)', | 43 '<(policy_constant_source)', |
38 '<(configuration_policy_type_header)', | 44 '<(configuration_policy_type_header)', |
45 '<(protobuf_decoder)', | |
39 ], | 46 ], |
40 'action_name': 'generate_policy_source', | 47 'action_name': 'generate_policy_source', |
41 'action': [ | 48 'action': [ |
42 '<@(generate_policy_source_script)', | 49 '<@(generate_policy_source_script)', |
43 '--policy-constants-header=<(policy_constant_header)', | 50 '--policy-constants-header=<(policy_constant_header)', |
44 '--policy-constants-source=<(policy_constant_source)', | 51 '--policy-constants-source=<(policy_constant_source)', |
45 '--policy-type-header=<(configuration_policy_type_header)', | 52 '--policy-type-header=<(configuration_policy_type_header)', |
53 '--protobuf-decoder=<(protobuf_decoder)', | |
46 '<(OS)', | 54 '<(OS)', |
47 '<@(_inputs)', | 55 '<@(_inputs)', |
48 ], | 56 ], |
49 'message': 'Generating policy source', | 57 'message': 'Generating policy source', |
50 'process_outputs_as_sources': 1, | 58 'process_outputs_as_sources': 1, |
51 }, | 59 }, |
52 ], | 60 ], |
53 }, ], | 61 }, ], |
54 ], | 62 ], |
55 }, | 63 }, |
56 'targets': [ | 64 'targets': [ |
57 { | 65 { |
66 'target_name': 'cloud_policy_proto_gen', | |
67 'type': 'none', | |
68 'hard_dependency': 1, | |
danno
2011/02/03 15:31:38
you don't need this, because it is not a shared li
Jakob Kummerow
2011/02/08 16:15:43
Done.
| |
69 'actions': [ | |
70 { | |
71 'variables': { | |
72 'cloud_policy_proto': | |
73 '<(policy_out_dir)/policy/cloud_policy.proto', | |
74 }, | |
75 'inputs': [ | |
76 'policy_templates.json', | |
77 '../../tools/build/generate_policy_source.py' | |
78 ], | |
79 'outputs': [ | |
80 '<(cloud_policy_proto)', | |
81 ], | |
82 'action_name': 'generate_cloud_policy_proto', | |
83 'action': [ | |
84 '<@(generate_policy_source_script)', | |
85 '--policy-protobuf=<(cloud_policy_proto)', | |
86 '<(OS)', | |
87 '<@(_inputs)', | |
88 ], | |
89 'message': 'Generating cloud policy protobuf', | |
90 }, | |
91 ], | |
92 }, | |
93 { | |
94 'target_name': 'cloud_policy_proto', | |
95 'type': 'none', | |
96 'variables': { | |
97 'proto_path_substr': 'chrome/browser/policy/proto', | |
98 'proto_rel_path': '../../../<(proto_path_substr)', | |
99 }, | |
100 'actions': [ | |
101 { | |
102 'action_name': 'compile_generated_proto', | |
103 'inputs': [ | |
104 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
105 '<(policy_out_dir)/policy/cloud_policy.proto', | |
106 ], | |
107 'outputs': [ | |
108 '<(PRODUCT_DIR)/pyproto/device_management_pb/cloud_policy_pb2.py', | |
109 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.h', | |
110 '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.cc', | |
111 ], | |
112 'action': [ | |
113 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
114 '--proto_path=<(policy_out_dir)/policy', | |
115 '<(policy_out_dir)/policy/cloud_policy.proto', | |
116 '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)', | |
117 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb', | |
118 ], | |
119 'message': 'Compiling generated cloud policy protobuf', | |
120 }, | |
121 ], | |
122 'sources': [ | |
123 '<(proto_rel_path)/device_management_backend.proto', | |
124 '<(proto_rel_path)/device_management_local.proto', | |
125 ], | |
126 'rules': [ | |
127 { | |
128 'rule_name': 'gen_proto', | |
129 'extension': 'proto', | |
130 'inputs': [ | |
131 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
132 ], | |
133 'outputs': [ | |
134 '<(PRODUCT_DIR)/pyproto/device_management_pb/<(RULE_INPUT_ROOT)_pb2. py', | |
135 '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.h', | |
136 '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.cc', | |
137 ], | |
138 'action': [ | |
139 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
140 '--proto_path=<(policy_out_dir)/policy', | |
141 '--proto_path=<(proto_rel_path)', | |
142 '<(proto_rel_path)/<(RULE_INPUT_NAME)', | |
143 '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)', | |
144 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb', | |
145 ], | |
146 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', | |
147 } | |
148 ], | |
149 'dependencies': [ | |
150 '../third_party/protobuf/protobuf.gyp:protoc#host', | |
151 'cloud_policy_proto_gen', | |
152 ], | |
153 'direct_dependent_settings': { | |
154 'include_dirs': [ | |
155 '<(protoc_out_dir)', | |
156 ] | |
157 }, | |
158 }, | |
159 { | |
58 'target_name': 'policy', | 160 'target_name': 'policy', |
59 'type': '<(library)', | 161 'type': '<(library)', |
60 'hard_dependency': 1, | 162 'hard_dependency': 1, |
61 'include_dirs': [ | 163 'include_dirs': [ |
62 '<(policy_out_dir)', | 164 '<(policy_out_dir)', |
63 ], | 165 ], |
166 'dependencies': [ | |
167 'cloud_policy_proto', | |
168 '../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
169 ], | |
64 'direct_dependent_settings': { | 170 'direct_dependent_settings': { |
65 'include_dirs': [ | 171 'include_dirs': [ |
66 '<(SHARED_INTERMEDIATE_DIR)/policy' | 172 '<(policy_out_dir)' |
67 ], | 173 ], |
68 }, | 174 }, |
69 'variables': { | 175 'variables': { |
70 'policy_target': 1, | 176 'policy_target': 1, |
71 }, | 177 }, |
72 }, | 178 }, |
73 ], | 179 ], |
74 'conditions': [ | 180 'conditions': [ |
75 ['OS=="win"', { | 181 ['OS=="win"', { |
76 'targets': [ | 182 'targets': [ |
77 { | 183 { |
78 'target_name': 'policy_win64', | 184 'target_name': 'policy_win64', |
79 'type': '<(library)', | 185 'type': '<(library)', |
80 'hard_dependency': 1, | 186 'hard_dependency': 1, |
81 'variables': { | 187 'variables': { |
82 'policy_target': 1, | 188 'policy_target': 1, |
83 }, | 189 }, |
84 'direct_dependent_settings': { | 190 'direct_dependent_settings': { |
85 'include_dirs': [ | 191 'include_dirs': [ |
86 '<(SHARED_INTERMEDIATE_DIR)/policy' | 192 '<(policy_out_dir)' |
87 ], | 193 ], |
88 }, | 194 }, |
89 'configurations': { | 195 'configurations': { |
90 'Common_Base': { | 196 'Common_Base': { |
91 'msvs_target_platform': 'x64', | 197 'msvs_target_platform': 'x64', |
92 }, | 198 }, |
93 }, | 199 }, |
94 }, | 200 }, |
95 ], | 201 ], |
96 }], | 202 }], |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 ] | 367 ] |
262 }] | 368 }] |
263 ], # 'conditions' | 369 ], # 'conditions' |
264 } | 370 } |
265 | 371 |
266 # Local Variables: | 372 # Local Variables: |
267 # tab-width:2 | 373 # tab-width:2 |
268 # indent-tabs-mode:nil | 374 # indent-tabs-mode:nil |
269 # End: | 375 # End: |
270 # vim: set expandtab tabstop=2 shiftwidth=2: | 376 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |