OLD | NEW |
| (Empty) |
1 # Copyright (c) 2010 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 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', | |
9 }, | |
10 'targets': [ | |
11 { | |
12 # Protobuf compiler / generate rule for the device management protocol. | |
13 'target_name': 'device_management_proto', | |
14 'type': 'none', | |
15 'sources': [ | |
16 'cloud_policy.proto', | |
17 'device_management_backend.proto', | |
18 'device_management_local.proto', | |
19 ], | |
20 'rules': [ | |
21 { | |
22 'rule_name': 'genproto', | |
23 'extension': 'proto', | |
24 'inputs': [ | |
25 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
26 ], | |
27 'variables': { | |
28 # The protoc compiler requires a proto_path argument with the | |
29 # directory containing the .proto file. There's no generator | |
30 # variable that corresponds to this, so fake it. | |
31 'rule_input_relpath': 'chrome/browser/policy/proto', | |
32 }, | |
33 'outputs': [ | |
34 '<(PRODUCT_DIR)/pyproto/device_management_pb/<(RULE_INPUT_ROOT)_pb2.
py', | |
35 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.h', | |
36 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.cc', | |
37 ], | |
38 'action': [ | |
39 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
40 '--proto_path=.', | |
41 './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', | |
42 '--cpp_out=<(protoc_out_dir)/<(rule_input_relpath)', | |
43 '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb', | |
44 ], | |
45 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', | |
46 }, | |
47 ], | |
48 'dependencies': [ | |
49 '../../../../third_party/protobuf/protobuf.gyp:protoc#host', | |
50 ], | |
51 'direct_dependent_settings': { | |
52 'include_dirs': [ | |
53 '<(protoc_out_dir)', | |
54 ] | |
55 }, | |
56 }, | |
57 { | |
58 'target_name': 'device_management_proto_cpp', | |
59 'type': 'none', | |
60 'export_dependent_settings': [ | |
61 '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
62 'device_management_proto', | |
63 ], | |
64 'dependencies': [ | |
65 '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
66 'device_management_proto', | |
67 ], | |
68 'direct_dependent_settings': { | |
69 'include_dirs': [ | |
70 '<(protoc_out_dir)', | |
71 ] | |
72 }, | |
73 }, | |
74 ], | |
75 } | |
76 | |
77 # Local Variables: | |
78 # tab-width:2 | |
79 # indent-tabs-mode:nil | |
80 # End: | |
81 # vim: set expandtab tabstop=2 shiftwidth=2: | |
OLD | NEW |