summaryrefslogtreecommitdiffstats
path: root/google_apis
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-16 11:39:54 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-16 11:39:54 +0000
commitf2817cfbc71a5148962db1e2c8a84e1aec433813 (patch)
tree5bc17bc8042c63343635990588c51307a800adfc /google_apis
parent4856698502d2fea99e3a57d3baf2218acda42923 (diff)
downloadchromium_src-f2817cfbc71a5148962db1e2c8a84e1aec433813.zip
chromium_src-f2817cfbc71a5148962db1e2c8a84e1aec433813.tar.gz
chromium_src-f2817cfbc71a5148962db1e2c8a84e1aec433813.tar.bz2
Isolate check_internal.py to the .gypi files that need it.
This works around the bug we've had where on some Windows machines, one of the invocations of check_internal.py mysteriously causes a file to open up in Visual Studio. We have no idea why, but this should avoid the problem. See details in bug. BUG=241208 Review URL: https://chromiumcodereview.appspot.com/12330155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis')
-rw-r--r--google_apis/determine_use_official_keys.gypi37
-rw-r--r--google_apis/google_apis.gyp6
2 files changed, 40 insertions, 3 deletions
diff --git a/google_apis/determine_use_official_keys.gypi b/google_apis/determine_use_official_keys.gypi
new file mode 100644
index 0000000..d9f1116
--- /dev/null
+++ b/google_apis/determine_use_official_keys.gypi
@@ -0,0 +1,37 @@
+# Copyright (c) 2013 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.
+
+# Include this .gypi in your target to dynamically set the
+# use_official_google_api_keys variable (unless it is already
+# explicitly set) and the associated preprocessor define.
+
+{
+ 'variables': {
+ 'variables': {
+ # See documentation of this variable in //build/common.gypi.
+ 'use_official_google_api_keys%': 2,
+ },
+
+ # Copy conditionally-set variables out one scope.
+ 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
+
+ 'conditions': [
+ # If use_official_google_api_keys is already set (to 0 or 1), we
+ # do none of the implicit checking. If it is set to 1 and the
+ # internal keys file is missing, the build will fail at compile
+ # time. If it is set to 0 and keys are not provided by other
+ # means, a warning will be printed at compile time.
+ ['use_official_google_api_keys==2', {
+ 'use_official_google_api_keys%':
+ '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
+ }],
+ ]
+ },
+
+ 'conditions': [
+ ['use_official_google_api_keys==1', {
+ 'defines': ['USE_OFFICIAL_GOOGLE_API_KEYS=1'],
+ }],
+ ],
+}
diff --git a/google_apis/google_apis.gyp b/google_apis/google_apis.gyp
index dd346a8..9a6ec47 100644
--- a/google_apis/google_apis.gyp
+++ b/google_apis/google_apis.gyp
@@ -13,6 +13,9 @@
{
'target_name': 'google_apis',
'type': 'static_library',
+ 'includes': [
+ 'determine_use_official_keys.gypi',
+ ],
'dependencies': [
'../base/base.gyp:base',
'../crypto/crypto.gyp:crypto',
@@ -45,9 +48,6 @@
'GOOGLE_CLIENT_SECRET_REMOTING="<(google_default_client_secret)"',
]
}],
- ['use_official_google_api_keys==1', {
- 'defines': ['USE_OFFICIAL_GOOGLE_API_KEYS=1'],
- }],
],
'sources': [
'gaia/gaia_auth_consumer.cc',