summaryrefslogtreecommitdiffstats
path: root/chrome/chrome.gyp
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 05:26:06 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 05:26:06 +0000
commitfd62678a517b1ed13cf67a9e677ae13b8f7784ae (patch)
tree0c89ec3342723a802d58c827c4fb8f7d0797fe6d /chrome/chrome.gyp
parentbb2b19e2ac4f5bb2ad50564e32240dc799c464f9 (diff)
downloadchromium_src-fd62678a517b1ed13cf67a9e677ae13b8f7784ae.zip
chromium_src-fd62678a517b1ed13cf67a9e677ae13b8f7784ae.tar.gz
chromium_src-fd62678a517b1ed13cf67a9e677ae13b8f7784ae.tar.bz2
Split platform specific settings out from locale_settings.grd so we can
have per platform config and overrides. This is easier to manage than the mess of <if>'s in the existing grd and xtb files. Each platform only builds its locale_settings_{win,mac,linux}.grd file. All the grd files generate the same platform_locale_settings.h header (for easy inclusion in .cc files). We use the fallback feature of grit to only specify locale specific values in xtb files if we want to override the default for the locale. BUG=28590 Review URL: http://codereview.chromium.org/545132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome.gyp')
-rwxr-xr-xchrome/chrome.gyp64
1 files changed, 64 insertions, 0 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 3d0b066..6cdf599 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -65,6 +65,8 @@
'NACL_LINUX=0',
'NACL_OSX=0',
],
+ 'platform_locale_settings_grd':
+ 'app/resources/locale_settings_win.grd',
},],
['OS=="linux"', {
'nacl_defines': [
@@ -72,6 +74,8 @@
'NACL_LINUX=1',
'NACL_OSX=0',
],
+ 'platform_locale_settings_grd':
+ 'app/resources/locale_settings_linux.grd',
},],
['OS=="mac"', {
'tweak_info_plist_path': 'tools/build/mac/tweak_info_plist',
@@ -80,6 +84,8 @@
'NACL_LINUX=0',
'NACL_OSX=1',
],
+ 'platform_locale_settings_grd':
+ 'app/resources/locale_settings_mac.grd',
'conditions': [
['branding=="Chrome"', {
'mac_bundle_id': 'com.google.Chrome',
@@ -338,6 +344,64 @@
],
},
{
+ # locale_settings_<platform>.grd have slightly different outputs, so it
+ # can't use chrome_strings rules above.
+ 'target_name': 'platform_locale_settings',
+ 'type': 'none',
+ 'variables': {
+ 'grit_path': '../tools/grit/grit.py',
+ },
+ 'actions': [
+ {
+ 'action_name': 'platform_locale_settings',
+ 'variables': {
+ 'input_path': '<(platform_locale_settings_grd)',
+ 'conditions': [
+ ['branding=="Chrome"', {
+ # TODO(mmoss) The .grd files look for _google_chrome, but for
+ # consistency they should look for GOOGLE_CHROME_BUILD like C++.
+ # Clean this up when Windows moves to gyp.
+ 'chrome_build': '_google_chrome',
+ }, { # else: branding!="Chrome"
+ 'chrome_build': '_chromium',
+ }],
+ ],
+ },
+ 'inputs': [
+ '<!@(<(grit_info_cmd) --inputs <(input_path))',
+ ],
+ 'outputs': [
+ '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))',
+ ],
+ 'action': [
+ 'python', '<(grit_path)',
+ '-i', '<(input_path)', 'build',
+ '-o', '<(grit_out_dir)',
+ '-D', '<(chrome_build)'
+ ],
+ 'conditions': [
+ ['chromeos==1', {
+ 'action': ['-D', 'chromeos'],
+ }],
+ ['use_titlecase_in_grd_files==1', {
+ 'action': ['-D', 'use_titlecase'],
+ }],
+ ],
+ 'message': 'Generating resources from <(input_path)',
+ },
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(grit_out_dir)',
+ ],
+ },
+ 'conditions': [
+ ['OS=="win"', {
+ 'dependencies': ['../build/win/system.gyp:cygwin'],
+ }],
+ ],
+ },
+ {
'target_name': 'default_extensions',
'type': 'none',
'msvs_guid': 'DA9BAB64-91DC-419B-AFDE-6FF8C569E83A',