OLD | NEW |
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 'chromium_code': 1, |
8 'out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out/remoting/base/protocol', | 8 'out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out/remoting/base/protocol', |
9 }, | 9 }, |
10 'targets': [ | 10 'targets': [ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 'direct_dependent_settings': { | 62 'direct_dependent_settings': { |
63 'include_dirs': [ | 63 'include_dirs': [ |
64 '<(SHARED_INTERMEDIATE_DIR)/protoc_out', | 64 '<(SHARED_INTERMEDIATE_DIR)/protoc_out', |
65 ], | 65 ], |
66 }, | 66 }, |
67 'sources': [ | 67 'sources': [ |
68 '<(out_dir)/chromotocol.pb.cc', | 68 '<(out_dir)/chromotocol.pb.cc', |
69 '<(out_dir)/chromotocol.pb.h', | 69 '<(out_dir)/chromotocol.pb.h', |
70 ], | 70 ], |
71 }, | 71 }, |
| 72 |
| 73 { |
| 74 # Protobuf compiler / generate rule for trace.proto. |
| 75 'target_name': 'trace_proto', |
| 76 'type': 'none', |
| 77 'sources': [ |
| 78 'trace.proto', |
| 79 ], |
| 80 'rules': [ |
| 81 { |
| 82 'rule_name': 'genproto', |
| 83 'extension': 'proto', |
| 84 'inputs': [ |
| 85 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', |
| 86 ], |
| 87 'outputs': [ |
| 88 '<(PRODUCT_DIR)/pyproto/<(RULE_INPUT_ROOT)_pb/' |
| 89 '<(RULE_INPUT_ROOT)_pb2.py', |
| 90 '<(out_dir)/<(RULE_INPUT_ROOT).pb.cc', |
| 91 '<(out_dir)/<(RULE_INPUT_ROOT).pb.h', |
| 92 ], |
| 93 'action': [ |
| 94 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', |
| 95 '--proto_path=.', |
| 96 './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', |
| 97 '--cpp_out=<(out_dir)', |
| 98 '--python_out=<(PRODUCT_DIR)/pyproto/<(RULE_INPUT_ROOT)_pb', |
| 99 ], |
| 100 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', |
| 101 }, |
| 102 ], |
| 103 'dependencies': [ |
| 104 '../../../third_party/protobuf2/protobuf.gyp:protoc#host', |
| 105 ], |
| 106 # This target exports a hard dependency because it generates header |
| 107 # files. |
| 108 'hard_dependency': 1, |
| 109 }, |
| 110 |
| 111 { |
| 112 'target_name': 'trace_proto_lib', |
| 113 'type': '<(library)', |
| 114 'export_dependent_settings': [ |
| 115 '../../../third_party/protobuf2/protobuf.gyp:protobuf_lite', |
| 116 'trace_proto', |
| 117 ], |
| 118 'dependencies': [ |
| 119 '../../../third_party/protobuf2/protobuf.gyp:protobuf_lite', |
| 120 'trace_proto', |
| 121 ], |
| 122 # This target exports a hard dependency because depedents require |
| 123 # chromotocol_proto to compile. |
| 124 'hard_dependency': 1, |
| 125 'direct_dependent_settings': { |
| 126 'include_dirs': [ |
| 127 '<(SHARED_INTERMEDIATE_DIR)/protoc_out', |
| 128 ], |
| 129 }, |
| 130 'sources': [ |
| 131 '<(out_dir)/trace.pb.cc', |
| 132 '<(out_dir)/trace.pb.h', |
| 133 ], |
| 134 }, |
72 ], | 135 ], |
73 } | 136 } |
74 | 137 |
75 # Local Variables: | 138 # Local Variables: |
76 # tab-width:2 | 139 # tab-width:2 |
77 # indent-tabs-mode:nil | 140 # indent-tabs-mode:nil |
78 # End: | 141 # End: |
79 # vim: set expandtab tabstop=2 shiftwidth=2: | 142 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |