| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # This library should build cleanly with the extra warnings turned on | 7 # This library should build cleanly with the extra warnings turned on |
| 8 # for Chromium. | 8 # for Chromium. |
| 9 'chromium_code': 1, | 9 'chromium_code': 1, |
| 10 # The root directory for the proto files. | |
| 11 'proto_dir_root': 'files/src', | |
| 12 # The relative path of the cacheinvalidation proto files from | 10 # The relative path of the cacheinvalidation proto files from |
| 13 # proto_dir_root. | 11 # 'files/src'. |
| 14 # TODO(akalin): Add a RULE_INPUT_DIR predefined variable to gyp so | 12 # TODO(akalin): Add a RULE_INPUT_DIR predefined variable to gyp so |
| 15 # we don't need this variable. | 13 # we don't need this variable. |
| 16 # TODO(ghc): Remove v2/ dir and move all files up a level. | 14 'proto_dir_relpath': 'google/cacheinvalidation', |
| 17 'proto_dir_relpath': 'google/cacheinvalidation/v2', | |
| 18 # Where files generated from proto files are put. | 15 # Where files generated from proto files are put. |
| 19 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', | 16 'proto_in_dir': 'files/src/<(proto_dir_relpath)', |
| 20 # The path to the protoc executable. | 17 'proto_out_dir': '<(proto_dir_relpath)', |
| 21 'protoc': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
| 22 }, | 18 }, |
| 23 'targets': [ | 19 'targets': [ |
| 24 # The rule/action to generate files from the cacheinvalidation proto | |
| 25 # files. | |
| 26 { | |
| 27 'target_name': 'cacheinvalidation_proto', | |
| 28 'type': 'none', | |
| 29 'sources': [ | |
| 30 '<(proto_dir_root)/<(proto_dir_relpath)/client.proto', | |
| 31 '<(proto_dir_root)/<(proto_dir_relpath)/client_gateway.proto', | |
| 32 '<(proto_dir_root)/<(proto_dir_relpath)/client_protocol.proto', | |
| 33 '<(proto_dir_root)/<(proto_dir_relpath)/client_test_internal.proto', | |
| 34 '<(proto_dir_root)/<(proto_dir_relpath)/types.proto', | |
| 35 ], | |
| 36 # TODO(akalin): This block was copied from the sync_proto target | |
| 37 # from chrome.gyp. Decomp the shared blocks out somehow. | |
| 38 'rules': [ | |
| 39 { | |
| 40 'rule_name': 'genproto', | |
| 41 'extension': 'proto', | |
| 42 'inputs': [ | |
| 43 '<(protoc)', | |
| 44 ], | |
| 45 'outputs': [ | |
| 46 '<(protoc_out_dir)/<(proto_dir_relpath)/<(RULE_INPUT_ROOT).pb.h', | |
| 47 '<(protoc_out_dir)/<(proto_dir_relpath)/<(RULE_INPUT_ROOT).pb.cc', | |
| 48 ], | |
| 49 'action': [ | |
| 50 '<(protoc)', | |
| 51 '--proto_path=<(proto_dir_root)', | |
| 52 # This path needs to be prefixed by proto_path, so we can't | |
| 53 # use RULE_INPUT_PATH (which is an absolute path). | |
| 54 '<(proto_dir_root)/<(proto_dir_relpath)/<(RULE_INPUT_NAME)', | |
| 55 '--cpp_out=<(protoc_out_dir)', | |
| 56 ], | |
| 57 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', | |
| 58 }, | |
| 59 ], | |
| 60 'dependencies': [ | |
| 61 '../../third_party/protobuf/protobuf.gyp:protoc#host', | |
| 62 ], | |
| 63 }, | |
| 64 # The C++ files generated from the cache invalidation protocol buffers. | 20 # The C++ files generated from the cache invalidation protocol buffers. |
| 65 { | 21 { |
| 66 'target_name': 'cacheinvalidation_proto_cpp', | 22 'target_name': 'cacheinvalidation_proto_cpp', |
| 67 'type': 'static_library', | 23 'type': 'static_library', |
| 68 'sources': [ | 24 'sources': [ |
| 69 '<(protoc_out_dir)/<(proto_dir_relpath)/client.pb.h', | 25 '<(proto_in_dir)/client.proto', |
| 70 '<(protoc_out_dir)/<(proto_dir_relpath)/client.pb.cc', | 26 '<(proto_in_dir)/client_gateway.proto', |
| 71 '<(protoc_out_dir)/<(proto_dir_relpath)/client_gateway.pb.h', | 27 '<(proto_in_dir)/client_protocol.proto', |
| 72 '<(protoc_out_dir)/<(proto_dir_relpath)/client_gateway.pb.cc', | 28 '<(proto_in_dir)/client_test_internal.proto', |
| 73 '<(protoc_out_dir)/<(proto_dir_relpath)/client_protocol.pb.h', | 29 '<(proto_in_dir)/types.proto', |
| 74 '<(protoc_out_dir)/<(proto_dir_relpath)/client_protocol.pb.cc', | |
| 75 '<(protoc_out_dir)/<(proto_dir_relpath)/client_test_internal.pb.h', | |
| 76 '<(protoc_out_dir)/<(proto_dir_relpath)/client_test_internal.pb.cc', | |
| 77 '<(protoc_out_dir)/<(proto_dir_relpath)/types.pb.h', | |
| 78 '<(protoc_out_dir)/<(proto_dir_relpath)/types.pb.cc', | |
| 79 ], | 30 ], |
| 80 'dependencies': [ | 31 'includes': [ '../../build/protoc.gypi' ], |
| 81 '../../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
| 82 'cacheinvalidation_proto', | |
| 83 ], | |
| 84 'include_dirs': [ | |
| 85 '<(protoc_out_dir)', | |
| 86 ], | |
| 87 'direct_dependent_settings': { | 32 'direct_dependent_settings': { |
| 88 'include_dirs': [ | 33 'include_dirs': [ |
| 89 '<(protoc_out_dir)', | 34 '<(proto_out_dir)', |
| 90 ], | 35 ], |
| 91 }, | 36 }, |
| 92 'export_dependent_settings': [ | |
| 93 '../../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
| 94 ], | |
| 95 # This target exports a hard dependency because it contains generated | |
| 96 # header files. | |
| 97 'hard_dependency': 1, | |
| 98 }, | 37 }, |
| 99 # The main cache invalidation library. External clients should depend | 38 # The main cache invalidation library. External clients should depend |
| 100 # only on this. | 39 # only on this. |
| 101 { | 40 { |
| 102 'target_name': 'cacheinvalidation', | 41 'target_name': 'cacheinvalidation', |
| 103 'type': 'static_library', | 42 'type': 'static_library', |
| 104 'sources': [ | 43 'sources': [ |
| 105 'overrides/google/cacheinvalidation/deps/callback.h', | 44 'overrides/google/cacheinvalidation/deps/callback.h', |
| 106 'overrides/google/cacheinvalidation/deps/gmock.h', | 45 'overrides/google/cacheinvalidation/deps/gmock.h', |
| 107 'overrides/google/cacheinvalidation/deps/googletest.h', | 46 'overrides/google/cacheinvalidation/deps/googletest.h', |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR)', | 174 '--variable', 'PRODUCT_DIR', '<(PRODUCT_DIR)', |
| 236 '--variable', 'OS', '<(OS)', | 175 '--variable', 'OS', '<(OS)', |
| 237 '--result', '<@(_outputs)', | 176 '--result', '<@(_outputs)', |
| 238 '--isolate', 'cacheinvalidation_unittests.isolate', | 177 '--isolate', 'cacheinvalidation_unittests.isolate', |
| 239 ], | 178 ], |
| 240 }, | 179 }, |
| 241 ], | 180 ], |
| 242 }, | 181 }, |
| 243 ], | 182 ], |
| 244 } | 183 } |
| OLD | NEW |