Fix the toolkit_views gyp variable define mania.
This makes it so toolkit_views==1 is always true for views builds,
either on Windows or ChromeOS.
Three levels of nesting are needed for this chained conditional:
1) Set the default value of ChromeOS.
2) Depending on ChromeOS value, set the default value of toolkit_views.
3) Depending on toolkit_views value, set the rest of the build variables.
This should have no affect on the build, but will allow subsequent cleanup.
Review URL: http://codereview.chromium.org/1799002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45639 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index 372ad35..163cf9ba 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -48,7 +48,24 @@
'host_arch%': 'ia32',
}],
],
+
+ # Whether we're building a ChromeOS build. We set the initial
+ # value at this level of nesting so it's available for the
+ # toolkit_views test below.
+ 'chromeos%': '0',
},
+
+ # Set default value of toolkit_views on for Windows and Chrome OS.
+ # We set it at this level of nesting so the value is available for
+ # other conditionals below.
+ 'conditions': [
+ ['OS=="win" or chromeos==1', {
+ 'toolkit_views%': 1,
+ }, {
+ 'toolkit_views%': 0,
+ }],
+ ],
+
'host_arch%': '<(host_arch)',
# Default architecture we're building for is the architecture we're
@@ -62,13 +79,8 @@
'linux_chromium_dump_symbols%': 0,
# Also see linux_strip_binary below.
- # By default, Linux does not use views. To turn on views in Linux,
- # set the variable GYP_DEFINES to "toolkit_views=1", or modify
- # ~/.gyp/include.gypi .
- 'toolkit_views%': 0,
-
- # Defaults to a desktop build, overridden via command line/env.
- 'chromeos%': 0,
+ # Copy conditionally-set chromeos variable out one scope.
+ 'chromeos%': '<(chromeos)',
# This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
# are built under a chromium full build (1) or a webkit.org chromium