summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriannucci@chromium.org <iannucci@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-31 01:07:32 +0000
committeriannucci@chromium.org <iannucci@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-31 01:07:32 +0000
commit69e1c46004ad506b2a7cfbce218f4cd20ba76bfe (patch)
treea888a9aa5dde202f123e8faba2defc569fceb1c7
parent9c5620d351e6f8f384de2b3c8a3d2ec34101e21e (diff)
downloadchromium_src-69e1c46004ad506b2a7cfbce218f4cd20ba76bfe.zip
chromium_src-69e1c46004ad506b2a7cfbce218f4cd20ba76bfe.tar.gz
chromium_src-69e1c46004ad506b2a7cfbce218f4cd20ba76bfe.tar.bz2
Change protoc build rule to not use cygwin bash.
Now protoc.exe will be directly invoked. This rolls cacheinvalidation from r218:r219 ------------------------------------------------------------------------ r219 | ghcooper@gmail.com | 2012-07-20 17:44:14 -0700 (Fri, 20 Jul 2012) | 1 line move protos out of v2/; use relative paths for proto imports ------------------------------------------------------------------------ This also rolls gyp from r1440:r1441 ------------------------------------------------------------------------ r1441 | iannucci@chromium.org | 2012-07-26 17:54:17 -0700 (Thu, 26 Jul 2012) | 8 lines Fix bug: non-cygwin actions incorrectly run options through _FixPath. This adds an additional heuristic to the existing one. Now if an option begins with either a '/' OR a '-', it assumes it's not a strict path. Added a TODO which notes that the existing (and new) behavior will miss options such as '--opt=a/posix/path', and '/opt:a/posix/path'. Review URL: https://chromiumcodereview.appspot.com/10829049 ------------------------------------------------------------------------ BUG=123026,113339 R=scottmg@chromium.org,cmp@chromium.org,nsylvain@chromium.org,jar@chromium.org,akalin@chromium.org,maruel@chromium.org TEST= Review URL: https://chromiumcodereview.appspot.com/10796051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149100 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--.gitignore1
-rw-r--r--DEPS4
-rw-r--r--build/protoc.gypi13
-rw-r--r--sync/notifier/chrome_invalidation_client.cc2
-rw-r--r--sync/notifier/chrome_invalidation_client_unittest.cc2
-rw-r--r--sync/notifier/invalidation_util.cc2
-rw-r--r--sync/notifier/non_blocking_invalidation_notifier_unittest.cc2
-rw-r--r--sync/notifier/push_client_channel.cc2
-rw-r--r--sync/notifier/sync_notifier_helper_unittest.cc2
-rw-r--r--third_party/cacheinvalidation/README.chromium2
-rw-r--r--third_party/cacheinvalidation/cacheinvalidation.gyp83
11 files changed, 29 insertions, 86 deletions
diff --git a/.gitignore b/.gitignore
index b69a829..08867b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@
*.vtg
*.xcodeproj
*_proto.xml
+*_proto_cpp.xml
*~
.*.sw?
.DS_Store
diff --git a/DEPS b/DEPS
index 57d1669..d375449 100644
--- a/DEPS
+++ b/DEPS
@@ -116,7 +116,7 @@ deps = {
"src/third_party/cacheinvalidation/files/src/google":
(Var("googlecode_url") % "google-cache-invalidation-api") +
- "/trunk/src/google@218",
+ "/trunk/src/google@219",
"src/third_party/leveldatabase/src":
(Var("googlecode_url") % "leveldb") + "/trunk@67",
@@ -128,7 +128,7 @@ deps = {
(Var("googlecode_url") % "grit-i18n") + "/trunk@63",
"src/tools/gyp":
- (Var("googlecode_url") % "gyp") + "/trunk@1440",
+ (Var("googlecode_url") % "gyp") + "/trunk@1441",
"src/v8":
(Var("googlecode_url") % "v8") + "/trunk@" + Var("v8_revision"),
diff --git a/build/protoc.gypi b/build/protoc.gypi
index 555c5be..3f776f2 100644
--- a/build/protoc.gypi
+++ b/build/protoc.gypi
@@ -1,8 +1,8 @@
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# This file is meant to be included into an target to provide a rule
+# This file is meant to be included into a target to provide a rule
# to invoke protoc in a consistent manner.
#
# To use this, create a gyp target with the following form:
@@ -58,13 +58,16 @@
],
'action': [
'<(protoc)',
- '--proto_path=<(proto_in_dir)',
+ # Using the --arg val form (instead of --arg=val) allows gyp's msvs rule
+ # generation to correct 'val' which is a path.
+ '--proto_path','<(proto_in_dir)',
# Naively you'd use <(RULE_INPUT_PATH) here, but protoc requires
# --proto_path is a strict prefix of the path given as an argument.
'<(proto_in_dir)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
- '--cpp_out=<(cc_dir)',
- '--python_out=<(py_dir)',
+ '--cpp_out','<(cc_dir)',
+ '--python_out','<(py_dir)',
],
+ 'msvs_cygwin_shell': 0,
'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
'process_outputs_as_sources': 1,
},
diff --git a/sync/notifier/chrome_invalidation_client.cc b/sync/notifier/chrome_invalidation_client.cc
index f0a3dee..8b9cd4f 100644
--- a/sync/notifier/chrome_invalidation_client.cc
+++ b/sync/notifier/chrome_invalidation_client.cc
@@ -13,7 +13,7 @@
#include "google/cacheinvalidation/include/invalidation-client-factory.h"
#include "google/cacheinvalidation/include/invalidation-client.h"
#include "google/cacheinvalidation/include/types.h"
-#include "google/cacheinvalidation/v2/types.pb.h"
+#include "google/cacheinvalidation/types.pb.h"
#include "jingle/notifier/listener/push_client.h"
#include "sync/notifier/invalidation_util.h"
#include "sync/notifier/registration_manager.h"
diff --git a/sync/notifier/chrome_invalidation_client_unittest.cc b/sync/notifier/chrome_invalidation_client_unittest.cc
index 465d259..98907a3 100644
--- a/sync/notifier/chrome_invalidation_client_unittest.cc
+++ b/sync/notifier/chrome_invalidation_client_unittest.cc
@@ -7,7 +7,7 @@
#include "base/message_loop.h"
#include "google/cacheinvalidation/include/invalidation-client.h"
#include "google/cacheinvalidation/include/types.h"
-#include "google/cacheinvalidation/v2/types.pb.h"
+#include "google/cacheinvalidation/types.pb.h"
#include "jingle/notifier/listener/fake_push_client.h"
#include "sync/internal_api/public/util/weak_handle.h"
#include "sync/notifier/chrome_invalidation_client.h"
diff --git a/sync/notifier/invalidation_util.cc b/sync/notifier/invalidation_util.cc
index 5b18d66..b10e2b4 100644
--- a/sync/notifier/invalidation_util.cc
+++ b/sync/notifier/invalidation_util.cc
@@ -7,7 +7,7 @@
#include <sstream>
#include "google/cacheinvalidation/include/types.h"
-#include "google/cacheinvalidation/v2/types.pb.h"
+#include "google/cacheinvalidation/types.pb.h"
namespace syncer {
diff --git a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
index 36f4532..0cadd4a 100644
--- a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
+++ b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/threading/thread.h"
-#include "google/cacheinvalidation/v2/types.pb.h"
+#include "google/cacheinvalidation/types.pb.h"
#include "jingle/notifier/base/fake_base_task.h"
#include "net/url_request/url_request_test_util.h"
#include "sync/internal_api/public/base/model_type.h"
diff --git a/sync/notifier/push_client_channel.cc b/sync/notifier/push_client_channel.cc
index 5cfd843..4e8f78e 100644
--- a/sync/notifier/push_client_channel.cc
+++ b/sync/notifier/push_client_channel.cc
@@ -5,7 +5,7 @@
#include "sync/notifier/push_client_channel.h"
#include "base/stl_util.h"
-#include "google/cacheinvalidation/v2/client_gateway.pb.h"
+#include "google/cacheinvalidation/client_gateway.pb.h"
#include "jingle/notifier/listener/push_client.h"
namespace syncer {
diff --git a/sync/notifier/sync_notifier_helper_unittest.cc b/sync/notifier/sync_notifier_helper_unittest.cc
index ba2d768..24d8871 100644
--- a/sync/notifier/sync_notifier_helper_unittest.cc
+++ b/sync/notifier/sync_notifier_helper_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "google/cacheinvalidation/v2/types.pb.h"
+#include "google/cacheinvalidation/types.pb.h"
#include "sync/notifier/sync_notifier_helper.h"
#include "sync/notifier/mock_sync_notifier_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/third_party/cacheinvalidation/README.chromium b/third_party/cacheinvalidation/README.chromium
index e54582d..f878c8c 100644
--- a/third_party/cacheinvalidation/README.chromium
+++ b/third_party/cacheinvalidation/README.chromium
@@ -1,7 +1,7 @@
Name: Google Cache Invalidation API
Short Name: google-cache-invalidation-api
URL: http://code.google.com/p/google-cache-invalidation-api/
-Version: r185
+Version: r219
License: Apache 2.0
License File: files/src/google/cacheinvalidation/COPYING
Security Critical: no
diff --git a/third_party/cacheinvalidation/cacheinvalidation.gyp b/third_party/cacheinvalidation/cacheinvalidation.gyp
index 6e4c03e..77e3c52 100644
--- a/third_party/cacheinvalidation/cacheinvalidation.gyp
+++ b/third_party/cacheinvalidation/cacheinvalidation.gyp
@@ -7,94 +7,33 @@
# This library should build cleanly with the extra warnings turned on
# for Chromium.
'chromium_code': 1,
- # The root directory for the proto files.
- 'proto_dir_root': 'files/src',
# The relative path of the cacheinvalidation proto files from
- # proto_dir_root.
+ # 'files/src'.
# TODO(akalin): Add a RULE_INPUT_DIR predefined variable to gyp so
# we don't need this variable.
- # TODO(ghc): Remove v2/ dir and move all files up a level.
- 'proto_dir_relpath': 'google/cacheinvalidation/v2',
+ 'proto_dir_relpath': 'google/cacheinvalidation',
# Where files generated from proto files are put.
- 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
- # The path to the protoc executable.
- 'protoc': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ 'proto_in_dir': 'files/src/<(proto_dir_relpath)',
+ 'proto_out_dir': '<(proto_dir_relpath)',
},
'targets': [
- # The rule/action to generate files from the cacheinvalidation proto
- # files.
- {
- 'target_name': 'cacheinvalidation_proto',
- 'type': 'none',
- 'sources': [
- '<(proto_dir_root)/<(proto_dir_relpath)/client.proto',
- '<(proto_dir_root)/<(proto_dir_relpath)/client_gateway.proto',
- '<(proto_dir_root)/<(proto_dir_relpath)/client_protocol.proto',
- '<(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)',
+ '<(proto_in_dir)/client.proto',
+ '<(proto_in_dir)/client_gateway.proto',
+ '<(proto_in_dir)/client_protocol.proto',
+ '<(proto_in_dir)/client_test_internal.proto',
+ '<(proto_in_dir)/types.proto',
],
+ 'includes': [ '../../build/protoc.gypi' ],
'direct_dependent_settings': {
'include_dirs': [
- '<(protoc_out_dir)',
+ '<(proto_out_dir)',
],
},
- '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,
},
# The main cache invalidation library. External clients should depend
# only on this.