Commit 7647cfba authored by aurimas@chromium.org's avatar aurimas@chromium.org

Only include ash_strings if use_ash==1.

ash_strings where included in Android build and none of them are actually used.
Restrict the include to only ash builds.

BUG=none

Review URL: https://codereview.chromium.org/136793004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245085 0039d316-1c4b-4281-b951-d872f2087c98
parent 28e91272
......@@ -16,7 +16,7 @@
},
'inputs': [
'tools/build/repack_locales.py',
'<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(repack_extra_flags) <(locales))'
'<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) --use-ash <(use_ash) <(repack_extra_flags) <(locales))'
],
'outputs': [
'<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(locales))'
......@@ -28,6 +28,7 @@
'-g', '<(grit_out_dir)',
'-s', '<(SHARED_INTERMEDIATE_DIR)',
'-x', '<(repack_output_dir)/.',
'--use-ash', '<(use_ash)',
'<@(repack_extra_flags)',
'<@(locales)',
],
......
......@@ -14,7 +14,7 @@
},
'inputs': [
'tools/build/repack_locales.py',
'<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))'
'<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) --use-ash <(use_ash) <(pseudo_locales))'
],
'conditions': [
['OS == "mac" or OS == "ios"', {
......@@ -34,6 +34,7 @@
'-g', '<(grit_out_dir)',
'-s', '<(SHARED_INTERMEDIATE_DIR)',
'-x', '<(SHARED_INTERMEDIATE_DIR)/.',
'--use-ash', '<(use_ash)',
'<@(pseudo_locales)',
],
}
......@@ -382,8 +382,6 @@
'conditions': [
['OS != "ios"', {
'dependencies': [
# TODO(zork): Protect this with if use_aura==1
'<(DEPTH)/ash/ash_strings.gyp:ash_strings',
'<(DEPTH)/content/content_resources.gyp:content_resources',
'<(DEPTH)/device/bluetooth/bluetooth_strings.gyp:device_bluetooth_strings',
'<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
......@@ -392,6 +390,7 @@
}],
['use_ash==1', {
'dependencies': [
'<(DEPTH)/ash/ash_strings.gyp:ash_strings',
'<(DEPTH)/ash/ash.gyp:ash_resources',
],
}],
......
......@@ -29,6 +29,8 @@ INT_DIR = None
# The target platform. If it is not defined, sys.platform will be used.
OS = None
USE_ASH = False
# Extra input files.
EXTRA_INPUT_FILES = []
......@@ -74,6 +76,11 @@ def calc_inputs(locale):
inputs.append(os.path.join(SHARE_INT_DIR, 'components', 'strings',
'component_strings_%s.pak' % locale))
if USE_ASH:
#e.g. '<(SHARED_INTERMEDIATE_DIR)/ash_strings/ash_strings_da.pak',
inputs.append(os.path.join(SHARE_INT_DIR, 'ash_strings',
'ash_strings_%s.pak' % locale))
if OS != 'ios':
#e.g. '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_da.pak'
inputs.append(os.path.join(SHARE_INT_DIR, 'webkit',
......@@ -83,10 +90,6 @@ def calc_inputs(locale):
inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'ui_strings',
'ui_strings_%s.pak' % locale))
#e.g. '<(SHARED_INTERMEDIATE_DIR)/ash_strings/ash_strings_da.pak',
inputs.append(os.path.join(SHARE_INT_DIR, 'ash_strings',
'ash_strings_%s.pak' % locale))
#e.g. '<(SHARED_INTERMEDIATE_DIR)/device/bluetooth/strings/
# device_bluetooth_strings_da.pak',
inputs.append(os.path.join(SHARE_INT_DIR, 'device', 'bluetooth', 'strings',
......@@ -152,6 +155,7 @@ def DoMain(argv):
global SHARE_INT_DIR
global INT_DIR
global OS
global USE_ASH
global EXTRA_INPUT_FILES
parser = optparse.OptionParser("usage: %prog [options] locales")
......@@ -172,6 +176,8 @@ def DoMain(argv):
locale suffix and \".pak\" extension.")
parser.add_option("-p", action="store", dest="os",
help="The target OS. (e.g. mac, linux, win, etc.)")
parser.add_option("--use-ash", action="store", dest="use_ash",
help="Whether to include ash strings")
options, locales = parser.parse_args(argv)
if not locales:
......@@ -185,6 +191,7 @@ def DoMain(argv):
BRANDING = options.branding
EXTRA_INPUT_FILES = options.extra_input
OS = options.os
USE_ASH = options.use_ash == '1'
if not OS:
if sys.platform == 'darwin':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment