diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 18:19:52 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 18:19:52 +0000 |
commit | f30e11dce0e8a28c3791cc093d3edd6888d406c5 (patch) | |
tree | ccb01e4e5b9d53c93c8633543c563915004e3b4f | |
parent | 7ee76d72d43f923d49ea43ec9c9fc30ebc0511d1 (diff) | |
download | chromium_src-f30e11dce0e8a28c3791cc093d3edd6888d406c5.zip chromium_src-f30e11dce0e8a28c3791cc093d3edd6888d406c5.tar.gz chromium_src-f30e11dce0e8a28c3791cc093d3edd6888d406c5.tar.bz2 |
Update sync protos to use the new shared protoc gyp rules
Just a refactoring.
Review URL: http://codereview.chromium.org/7677034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97484 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/protoc.gypi | 5 | ||||
-rw-r--r-- | chrome/browser/sync/protocol/sync_proto.gyp | 80 | ||||
-rw-r--r-- | chrome/chrome.gyp | 18 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 12 | ||||
-rw-r--r-- | net/net.gyp | 1 |
6 files changed, 26 insertions, 92 deletions
diff --git a/build/protoc.gypi b/build/protoc.gypi index d5df91f..555c5be 100644 --- a/build/protoc.gypi +++ b/build/protoc.gypi @@ -81,6 +81,11 @@ '<(SHARED_INTERMEDIATE_DIR)/protoc_out', ] }, + 'export_dependent_settings': [ + # The generated headers reference headers within protobuf_lite, + # so dependencies must be able to find those headers too. + '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', + ], # This target exports a hard dependency because it generates header # files. 'hard_dependency': 1, diff --git a/chrome/browser/sync/protocol/sync_proto.gyp b/chrome/browser/sync/protocol/sync_proto.gyp index dc550fe..ad60328 100644 --- a/chrome/browser/sync/protocol/sync_proto.gyp +++ b/chrome/browser/sync/protocol/sync_proto.gyp @@ -5,14 +5,11 @@ { 'variables': { 'chromium_code': 1, - 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', }, 'targets': [ { - # Protobuf compiler / generate rule for sync.proto. This is used by - # test code in net, which is why it's isolated into its own .gyp file. 'target_name': 'sync_proto', - 'type': 'none', + 'type': 'static_library', 'sources': [ 'sync.proto', 'encryption.proto', @@ -29,79 +26,10 @@ 'theme_specifics.proto', 'typed_url_specifics.proto', ], - 'rules': [ - { - 'rule_name': 'genproto', - 'extension': 'proto', - 'inputs': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/pyproto/sync_pb/<(RULE_INPUT_ROOT)_pb2.py', - '<(protoc_out_dir)/chrome/browser/sync/protocol/<(RULE_INPUT_ROOT).pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/<(RULE_INPUT_ROOT).pb.cc', - ], - 'action': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', - '--proto_path=.', - './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', - '--cpp_out=<(protoc_out_dir)/chrome/browser/sync/protocol', - '--python_out=<(PRODUCT_DIR)/pyproto/sync_pb', - ], - 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', - }, - ], - 'dependencies': [ - '../../../../third_party/protobuf/protobuf.gyp:protoc#host', - ], - }, - { - 'target_name': 'sync_proto_cpp', - 'type': 'static_library', - 'sources': [ - '<(protoc_out_dir)/chrome/browser/sync/protocol/sync.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/sync.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/encryption.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/encryption.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/app_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/app_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/autofill_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/autofill_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/bookmark_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/bookmark_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/extension_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/extension_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/nigori_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/nigori_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/password_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/password_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/preference_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/preference_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/search_engine_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/search_engine_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/session_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/session_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/theme_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/theme_specifics.pb.h', - '<(protoc_out_dir)/chrome/browser/sync/protocol/typed_url_specifics.pb.cc', - '<(protoc_out_dir)/chrome/browser/sync/protocol/typed_url_specifics.pb.h', - ], - 'export_dependent_settings': [ - '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', - 'sync_proto', - ], - 'dependencies': [ - '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', - 'sync_proto', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(protoc_out_dir)', - ], + 'variables': { + 'proto_out_dir': 'chrome/browser/sync/protocol', }, - # This target exports a hard dependency because it includes generated - # header files. - 'hard_dependency': 1, + 'includes': ['../../../../build/protoc.gypi'], }, ], } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index f180070..34c23e7 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -542,18 +542,18 @@ '../third_party/icu/icu.gyp:icuuc', '../third_party/sqlite/sqlite.gyp:sqlite', 'app/policy/cloud_policy_codegen.gyp:policy', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'common_constants', 'common_net', 'sync', 'sync_notifier', ], 'export_dependent_settings': [ - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'sync', ], # This target exports a hard dependency because syncapi.h includes - # generated proto header files from sync_proto_cpp. + # generated proto header files from sync_proto. 'hard_dependency': 1, }, { @@ -577,15 +577,15 @@ ], 'dependencies': [ '../base/base.gyp:base', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'sync', ], 'export_dependent_settings': [ '../base/base.gyp:base', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'sync', ], - # Even though this target depends on sync_proto_cpp, it doesn't + # Even though this target depends on sync_proto, it doesn't # need to export a hard dependency since we explicitly avoid # including the generated proto header files from this target's # header files. @@ -744,15 +744,15 @@ '../base/base.gyp:base', '../crypto/crypto.gyp:crypto', '../skia/skia.gyp:skia', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', ], 'export_dependent_settings': [ '../base/base.gyp:base', '../crypto/crypto.gyp:crypto', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', ], # This target exports a hard dependency because its header files include - # protobuf header files from sync_proto_cpp. + # protobuf header files from sync_proto. 'hard_dependency': 1, 'conditions': [ ['OS=="win"', { diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index fd0bc4d..976b3de 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -9,7 +9,7 @@ 'type': 'static_library', 'dependencies': [ 'app/policy/cloud_policy_codegen.gyp:policy', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome_extra_resources', 'chrome_resources', 'chrome_strings', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 181bda7..b63e691 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -29,7 +29,7 @@ 'chrome_resources', 'chrome_strings', 'app/policy/cloud_policy_codegen.gyp:policy', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'theme_resources', 'theme_resources_standard', '../base/base.gyp:test_support_base', @@ -470,7 +470,7 @@ 'target_name': 'interactive_ui_tests', 'type': 'executable', 'dependencies': [ - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', 'chrome_resources', 'chrome_strings', @@ -2386,7 +2386,7 @@ }, 'dependencies': [ 'browser', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', 'chrome_resources', 'chrome_strings', @@ -3206,7 +3206,7 @@ '_USE_32BIT_TIME_T', ], 'dependencies': [ - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'common', 'debugger', '../jingle/jingle.gyp:notifier_test_util', @@ -3289,7 +3289,7 @@ 'type': 'executable', 'dependencies': [ 'browser', - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', 'chrome_resources', 'common', @@ -3449,7 +3449,7 @@ 'target_name': 'sync_performance_tests', 'type': 'executable', 'dependencies': [ - 'browser/sync/protocol/sync_proto.gyp:sync_proto_cpp', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', 'test_support_common', '../skia/skia.gyp:skia', diff --git a/net/net.gyp b/net/net.gyp index 40bade8..12bb890 100644 --- a/net/net.gyp +++ b/net/net.gyp @@ -1252,6 +1252,7 @@ ['inside_chromium_build==1', { 'dependencies': [ '../chrome/app/policy/cloud_policy_codegen.gyp:cloud_policy_proto_compile', + # The test server uses Python modules generated by the sync protos. '../chrome/browser/sync/protocol/sync_proto.gyp:sync_proto', '../third_party/protobuf/protobuf.gyp:py_proto', ], |