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

Side by Side Diff: chrome/app/policy/policy_templates.gypi

Issue 6409040: New policy protobuf protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review! 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
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 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', 7 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy',
8 'generate_policy_source_script': 8 'generate_policy_source_script':
9 ['python', 'tools/build/generate_policy_source.py'], 9 ['python', 'tools/build/generate_policy_source.py'],
10 }, 10 },
11 'target_defaults': { 11 'target_defaults': {
12 'variables': { 12 'variables': {
13 'policy_target': 0, 13 'policy_target': 0,
14 }, 14 },
15 'target_conditions': [ 15 'target_conditions': [
16 [ 'policy_target==1', { 16 [ 'policy_target==1', {
17 'include_dirs': [ 17 'include_dirs': [
18 '<(policy_out_dir)', 18 '<(policy_out_dir)',
19 ], 19 ],
20 'actions': [ 20 'actions': [
21 { 21 {
22 'variables': 22 'variables':
23 { 23 {
24 'policy_constant_header': 24 'policy_constant_header':
25 '<(policy_out_dir)/policy/policy_constants.h', 25 '<(policy_out_dir)/policy/policy_constants.h',
26 'policy_constant_source': 26 'policy_constant_source':
27 '<(policy_out_dir)/policy/policy_constants.cc', 27 '<(policy_out_dir)/policy/policy_constants.cc',
28 'configuration_policy_type_header': 28 'configuration_policy_type_header':
29 '<(policy_out_dir)/policy/configuration_policy_type.h', 29 '<(policy_out_dir)/policy/configuration_policy_type.h',
30 'cloud_policy_proto':
31 '<(policy_out_dir)/policy/cloud_policy.proto',
32 'protobuf_decoder':
33 '<(policy_out_dir)/policy/cloud_policy_generated.cc',
30 }, 34 },
31 'inputs': [ 35 'inputs': [
32 'policy_templates.json', 36 'policy_templates.json',
33 '../../tools/build/generate_policy_source.py' 37 '../../tools/build/generate_policy_source.py'
34 ], 38 ],
35 'outputs': [ 39 'outputs': [
36 '<(policy_constant_header)', 40 '<(policy_constant_header)',
37 '<(policy_constant_source)', 41 '<(policy_constant_source)',
38 '<(configuration_policy_type_header)', 42 '<(configuration_policy_type_header)',
43 '<(cloud_policy_proto)',
44 '<(protobuf_decoder)',
39 ], 45 ],
40 'action_name': 'generate_policy_source', 46 'action_name': 'generate_policy_source',
41 'action': [ 47 'action': [
42 '<@(generate_policy_source_script)', 48 '<@(generate_policy_source_script)',
43 '--policy-constants-header=<(policy_constant_header)', 49 '--policy-constants-header=<(policy_constant_header)',
44 '--policy-constants-source=<(policy_constant_source)', 50 '--policy-constants-source=<(policy_constant_source)',
45 '--policy-type-header=<(configuration_policy_type_header)', 51 '--policy-type-header=<(configuration_policy_type_header)',
52 '--policy-protobuf=<(cloud_policy_proto)',
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 {
58 'target_name': 'policy', 66 'target_name': 'policy',
59 'type': '<(library)', 67 'type': '<(library)',
60 'hard_dependency': 1, 68 'hard_dependency': 1,
61 'include_dirs': [ 69 'include_dirs': [
62 '<(policy_out_dir)', 70 '<(policy_out_dir)',
71 '<(protoc_out_dir)',
72 '../../..',
73 ],
74 'dependencies': [
75 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
63 ], 76 ],
64 'direct_dependent_settings': { 77 'direct_dependent_settings': {
65 'include_dirs': [ 78 'include_dirs': [
66 '<(SHARED_INTERMEDIATE_DIR)/policy' 79 '<(SHARED_INTERMEDIATE_DIR)/policy'
67 ], 80 ],
68 }, 81 },
69 'variables': { 82 'variables': {
70 'policy_target': 1, 83 'policy_target': 1,
71 }, 84 },
72 }, 85 },
86 {
87 'target_name': 'cloud_policy_protobuf',
88 'type': 'none',
89 'sources': [
90 '<(policy_out_dir)/policy/cloud_policy.proto',
91 ],
92 'rules': [
93 {
94 'rule_name': 'gen_proto',
95 'extension': 'proto',
96 'inputs': [
97 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
98 ],
99 'variables': {
100 'rule_input_relpath': 'chrome/browser/policy/proto',
101 },
102 'outputs': [
103 '<(PRODUCT_DIR)/pyproto/device_management_pb/<(RULE_INPUT_ROOT)_pb2. py',
104 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.h',
105 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.cc',
106 ],
107 'action': [
108 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
109 '--proto_path=<(policy_out_dir)/policy',
110 '<(policy_out_dir)/policy/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
111 '--cpp_out=<(protoc_out_dir)/<(rule_input_relpath)',
112 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb',
113 ],
114 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
115 }
116 ],
117 'dependencies': [
118 '../third_party/protobuf/protobuf.gyp:protoc#host',
119 ],
120 'direct_dependent_settings': {
121 'include_dirs': [
122 '<(protoc_out_dir)',
123 '<(SHARED_INTERMEDIATE_DIR)/policy',
124 ]
125 },
126 },
73 ], 127 ],
74 'conditions': [ 128 'conditions': [
75 ['OS=="win"', { 129 ['OS=="win"', {
76 'targets': [ 130 'targets': [
77 { 131 {
78 'target_name': 'policy_win64', 132 'target_name': 'policy_win64',
79 'type': '<(library)', 133 'type': '<(library)',
80 'hard_dependency': 1, 134 'hard_dependency': 1,
81 'variables': { 135 'variables': {
82 'policy_target': 1, 136 'policy_target': 1,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 ] 315 ]
262 }] 316 }]
263 ], # 'conditions' 317 ], # 'conditions'
264 } 318 }
265 319
266 # Local Variables: 320 # Local Variables:
267 # tab-width:2 321 # tab-width:2
268 # indent-tabs-mode:nil 322 # indent-tabs-mode:nil
269 # End: 323 # End:
270 # vim: set expandtab tabstop=2 shiftwidth=2: 324 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « no previous file | chrome/app/policy/policy_templates.json » ('j') | chrome/app/policy/policy_templates.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698