From fd62678a517b1ed13cf67a9e677ae13b8f7784ae Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Fri, 22 Jan 2010 05:26:06 +0000 Subject: 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 '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 --- chrome/chrome.gyp | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'chrome/chrome.gyp') 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_.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': [ + '