diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 21:54:33 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 21:54:33 +0000 |
commit | 1c20dd62b563912adece78d8e674b6aecfce3c91 (patch) | |
tree | 1ba6fc10783000fe05734343dbcfcbf4d207b81c /chrome/chrome_common.gypi | |
parent | d66f0e4b77fbe8c3615853643c7dfd286d98ec15 (diff) | |
download | chromium_src-1c20dd62b563912adece78d8e674b6aecfce3c91.zip chromium_src-1c20dd62b563912adece78d8e674b6aecfce3c91.tar.gz chromium_src-1c20dd62b563912adece78d8e674b6aecfce3c91.tar.bz2 |
Update chrome_common protos to use shared protoc gypi
Just a refactoring.
Review URL: http://codereview.chromium.org/7624059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_common.gypi')
-rw-r--r-- | chrome/chrome_common.gypi | 111 |
1 files changed, 11 insertions, 100 deletions
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index e11931f..84c7dc3 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -101,7 +101,6 @@ 'common_constants', 'common_net', 'default_plugin/default_plugin.gyp:default_plugin', - 'safe_browsing_csd_proto', 'safe_browsing_proto', 'theme_resources', 'theme_resources_standard', @@ -118,7 +117,6 @@ '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', '../third_party/libxml/libxml.gyp:libxml', - '../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/sqlite/sqlite.gyp:sqlite', '../third_party/zlib/zlib.gyp:zlib', '../ui/ui.gyp:ui_resources', @@ -222,10 +220,6 @@ 'common/render_messages.cc', 'common/render_messages.h', 'common/scoped_co_mem.h', - '<(protoc_out_dir)/chrome/common/safe_browsing/client_model.pb.cc', - '<(protoc_out_dir)/chrome/common/safe_browsing/client_model.pb.h', - '<(protoc_out_dir)/chrome/common/safe_browsing/csd.pb.cc', - '<(protoc_out_dir)/chrome/common/safe_browsing/csd.pb.h', 'common/search_provider.h', 'common/service_messages.h', 'common/service_process_util.cc', @@ -342,15 +336,8 @@ ], }], ], - # This target exports a hard_dependency because its include files - # include generated header files from safe_browsing_csd_proto and - # safe_browsing_proto. - 'hard_dependency': 1, 'export_dependent_settings': [ '../base/base.gyp:base', - '../third_party/protobuf/protobuf.gyp:protobuf_lite', - 'safe_browsing_csd_proto', - 'safe_browsing_proto', ], }, { @@ -418,96 +405,20 @@ ], }, { - # Protobuf compiler / generator for the safebrowsing client model proto. + # Protobuf compiler / generator for the safebrowsing client + # model proto and the client-side detection (csd) request + # protocol buffer. 'target_name': 'safe_browsing_proto', - 'type': 'none', - 'sources': [ 'common/safe_browsing/client_model.proto' ], - 'rules': [ - { - 'rule_name': 'genproto', - 'extension': 'proto', - 'inputs': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', - ], - 'variables': { - # The protoc compiler requires a proto_path argument with the - # directory containing the .proto file. - # There's no generator variable that corresponds to this, so fake - # it. - 'rule_input_relpath': 'common/safe_browsing', - }, - 'outputs': [ - '<(protoc_out_dir)/chrome/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.h', - '<(protoc_out_dir)/chrome/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.cc', - ], - 'action': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', - '--proto_path=./<(rule_input_relpath)', - './<(rule_input_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', - '--cpp_out=<(protoc_out_dir)/chrome/<(rule_input_relpath)', - ], - 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', - }, - ], - 'dependencies': [ - '../third_party/protobuf/protobuf.gyp:protobuf_lite', - '../third_party/protobuf/protobuf.gyp:protoc#host', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(protoc_out_dir)', - ] - }, - 'export_dependent_settings': [ - '../third_party/protobuf/protobuf.gyp:protobuf_lite', - ], - }, - { - # Protobuf compiler / generator for the safebrowsing client-side detection - # (csd) request protocol buffer which is used both in the renderer and in - # the browser. - 'target_name': 'safe_browsing_csd_proto', - 'type': 'none', - 'sources': [ 'common/safe_browsing/csd.proto' ], - 'rules': [ - { - 'rule_name': 'genproto', - 'extension': 'proto', - 'inputs': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', - ], - 'variables': { - # The protoc compiler requires a proto_path argument with the - # directory containing the .proto file. - # There's no generator variable that corresponds to this, so fake - # it. - 'rule_input_relpath': 'common/safe_browsing', - }, - 'outputs': [ - '<(protoc_out_dir)/chrome/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.h', - '<(protoc_out_dir)/chrome/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.cc', - ], - 'action': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', - '--proto_path=./<(rule_input_relpath)', - './<(rule_input_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', - '--cpp_out=<(protoc_out_dir)/chrome/<(rule_input_relpath)', - ], - 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', - }, - ], - 'dependencies': [ - '../third_party/protobuf/protobuf.gyp:protobuf_lite', - '../third_party/protobuf/protobuf.gyp:protoc#host', + 'type': 'static_library', + 'sources': [ + 'common/safe_browsing/client_model.proto', + 'common/safe_browsing/csd.proto' ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(protoc_out_dir)', - ] + 'variables': { + 'proto_in_dir': 'common/safe_browsing', + 'proto_out_dir': 'chrome/common/safe_browsing', }, - 'export_dependent_settings': [ - '../third_party/protobuf/protobuf.gyp:protobuf_lite', - ], + 'includes': [ '../build/protoc.gypi' ], }, ], 'conditions': [ |