Chromium Code Reviews| Index: third_party/cacheinvalidation/cacheinvalidation.gyp |
| diff --git a/third_party/cacheinvalidation/cacheinvalidation.gyp b/third_party/cacheinvalidation/cacheinvalidation.gyp |
| index dce6f6eb33df3068d20459364cf260758816df1e..1c0d550eb192c93b901157232bce726c84e9a9fc 100644 |
| --- a/third_party/cacheinvalidation/cacheinvalidation.gyp |
| +++ b/third_party/cacheinvalidation/cacheinvalidation.gyp |
| @@ -22,10 +22,10 @@ |
| }, |
| 'targets': [ |
| # The rule/action to generate files from the cacheinvalidation proto |
| - # files. |
| + # files and package them into a static library. |
| { |
| 'target_name': 'cacheinvalidation_proto', |
| - 'type': 'none', |
| + 'type': 'static_library', |
| 'sources': [ |
| '<(proto_dir_root)/<(proto_dir_relpath)/client.proto', |
| '<(proto_dir_root)/<(proto_dir_relpath)/client_gateway.proto', |
| @@ -33,68 +33,14 @@ |
| '<(proto_dir_root)/<(proto_dir_relpath)/client_test_internal.proto', |
| '<(proto_dir_root)/<(proto_dir_relpath)/types.proto', |
| ], |
| - # TODO(akalin): This block was copied from the sync_proto target |
| - # from chrome.gyp. Decomp the shared blocks out somehow. |
| - 'rules': [ |
| - { |
| - 'rule_name': 'genproto', |
| - 'extension': 'proto', |
| - 'inputs': [ |
| - '<(protoc)', |
| - ], |
| - 'outputs': [ |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/<(RULE_INPUT_ROOT).pb.h', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/<(RULE_INPUT_ROOT).pb.cc', |
| - ], |
| - 'action': [ |
| - '<(protoc)', |
| - '--proto_path=<(proto_dir_root)', |
| - # This path needs to be prefixed by proto_path, so we can't |
| - # use RULE_INPUT_PATH (which is an absolute path). |
| - '<(proto_dir_root)/<(proto_dir_relpath)/<(RULE_INPUT_NAME)', |
| - '--cpp_out=<(protoc_out_dir)', |
| - ], |
| - 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', |
| - }, |
| - ], |
| - 'dependencies': [ |
| - '../../third_party/protobuf/protobuf.gyp:protoc#host', |
| - ], |
| - }, |
| - # The C++ files generated from the cache invalidation protocol buffers. |
| - { |
| - 'target_name': 'cacheinvalidation_proto_cpp', |
| - 'type': 'static_library', |
| - 'sources': [ |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client.pb.h', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client.pb.cc', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client_gateway.pb.h', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client_gateway.pb.cc', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client_protocol.pb.h', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client_protocol.pb.cc', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client_test_internal.pb.h', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/client_test_internal.pb.cc', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/types.pb.h', |
| - '<(protoc_out_dir)/<(proto_dir_relpath)/types.pb.cc', |
| - ], |
| - 'dependencies': [ |
| - '../../third_party/protobuf/protobuf.gyp:protobuf_lite', |
| - 'cacheinvalidation_proto', |
| - ], |
| - 'include_dirs': [ |
| - '<(protoc_out_dir)', |
| - ], |
| - 'direct_dependent_settings': { |
| - 'include_dirs': [ |
| - '<(protoc_out_dir)', |
| - ], |
| + 'variables': { |
| + 'proto_in_dir': '<(proto_dir_root)', |
| + # Setting this will lead to the generated files being placed in: |
| + # out/Debug/pyproto/<(proto_out_dir)/<(proto_relpath)/file_pb2.py |
| + 'proto_out_dir': '', |
| + 'proto_relpath': '<(proto_dir_relpath)', |
|
Ryan Sleevi
2012/02/13 19:32:12
And this becomes
'proto_relpath': '<(proto_dir_rel
|
| }, |
| - 'export_dependent_settings': [ |
| - '../../third_party/protobuf/protobuf.gyp:protobuf_lite', |
| - ], |
| - # This target exports a hard dependency because it contains generated |
| - # header files. |
| - 'hard_dependency': 1, |
| + 'includes': [ '../../build/protoc.gypi' ], |
| }, |
| # The main cache invalidation library. External clients should depend |
| # only on this. |
| @@ -170,7 +116,6 @@ |
| 'dependencies': [ |
| '../../base/base.gyp:base', |
| 'cacheinvalidation_proto', |
| - 'cacheinvalidation_proto_cpp', |
| ], |
| # This target exports a hard dependency because its include files |
| # include generated header files from cache_invalidation_proto_cpp. |
| @@ -183,7 +128,6 @@ |
| }, |
| 'export_dependent_settings': [ |
| '../../base/base.gyp:base', |
| - 'cacheinvalidation_proto_cpp', |
| ], |
| }, |
| # Unittests for the cache invalidation library. |