diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-28 12:01:29 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-28 12:01:29 +0000 |
commit | 4de39f87c85a89046e2bbead1ddd4d6c85e1278c (patch) | |
tree | 41c862a438f14947f760c92edc9a70d0aa7215ce /ui | |
parent | fb3e985829bde90a71134801d773ad8e1407dda1 (diff) | |
download | chromium_src-4de39f87c85a89046e2bbead1ddd4d6c85e1278c.zip chromium_src-4de39f87c85a89046e2bbead1ddd4d6c85e1278c.tar.gz chromium_src-4de39f87c85a89046e2bbead1ddd4d6c85e1278c.tar.bz2 |
Standardize grit invokes
- Add two gypi files to src/build for the boilerplate added to targets and actions
- Update grit_info to also support the -E flag so it can share more of the grit build commandline
- switch over all but the webkit and webkit glue grd files to use the common support
BUG=22247
TEST=everything still localized correctly
Review URL: http://codereview.chromium.org/6705030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/strings/ui_strings.gyp | 56 | ||||
-rw-r--r-- | ui/ui_gfx.gypi | 36 |
2 files changed, 27 insertions, 65 deletions
diff --git a/ui/base/strings/ui_strings.gyp b/ui/base/strings/ui_strings.gyp index a561508..257a9da 100644 --- a/ui/base/strings/ui_strings.gyp +++ b/ui/base/strings/ui_strings.gyp @@ -1,49 +1,35 @@ { 'variables': { - # TODO: remove this helper when we have loops in GYP - 'apply_locales_cmd': ['python', '<(DEPTH)/build/apply_locales.py',], 'chromium_code': 1, - 'grit_cmd': ['python', '../../../tools/grit/grit.py'], - 'grit_info_cmd': ['python', '../../../tools/grit/grit_info.py', - '<@(grit_defines)'], - 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', - 'localizable_resources': [ - 'app_locale_settings.grd', - 'app_strings.grd', - ], + 'grit_base_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', }, 'targets': [ { 'target_name': 'ui_strings', 'type': 'none', 'msvs_guid': 'BC3C49A3-D061-4E78-84EE-742DA064DC46', - 'rules': [ + 'actions': [ { - 'rule_name': 'grit', - 'extension': 'grd', - 'inputs': [ - '<!@(<(grit_info_cmd) --inputs <(localizable_resources))', - ], - 'outputs': [ - '<(grit_out_dir)/<(RULE_INPUT_ROOT)/grit/<(RULE_INPUT_ROOT).h', - # TODO: remove this helper when we have loops in GYP - '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(RULE_INPUT_ROOT)/<(RULE_INPUT_ROOT)_ZZLOCALE.pak\' <(locales))', - ], - 'action': [ - '<@(grit_cmd)', - '-i', '<(RULE_INPUT_PATH)', 'build', - '-o', '<(grit_out_dir)/<(RULE_INPUT_ROOT)', - '<@(grit_defines)'], - 'message': 'Generating resources from <(RULE_INPUT_PATH)', + 'action_name': 'app_strings', + 'variables': { + 'grit_grd_file': 'app_strings.grd', + 'grit_out_dir': '<(grit_base_out_dir)/app_strings', + }, + 'includes': [ '../../../build/grit_action.gypi' ], + }, + { + 'action_name': 'app_locale_settings', + 'variables': { + 'grit_grd_file': 'app_locale_settings.grd', + 'grit_out_dir': '<(grit_base_out_dir)/app_locale_settings', + }, + 'includes': [ '../../../build/grit_action.gypi' ], }, - ], - 'sources': [ - '<@(localizable_resources)', ], 'direct_dependent_settings': { 'include_dirs': [ - '<(grit_out_dir)/app_locale_settings', - '<(grit_out_dir)/app_strings', + '<(grit_base_out_dir)/app_locale_settings', + '<(grit_base_out_dir)/app_strings', ], }, 'conditions': [ @@ -66,8 +52,8 @@ 'action_name': 'repack_ui_unittest_strings', 'variables': { 'pak_inputs': [ - '<(grit_out_dir)/app_strings/app_strings_en-US.pak', - '<(grit_out_dir)/app_locale_settings/app_locale_settings_en-US.pak', + '<(grit_base_out_dir)/app_strings/app_strings_en-US.pak', + '<(grit_base_out_dir)/app_locale_settings/app_locale_settings_en-US.pak', ], }, 'inputs': [ @@ -85,7 +71,7 @@ { 'destination': '<(PRODUCT_DIR)/app_unittests_strings', 'files': [ - '<(grit_out_dir)/app_resources/app_resources.pak', + '<(grit_base_out_dir)/app_resources/app_resources.pak', ], }, ], diff --git a/ui/ui_gfx.gypi b/ui/ui_gfx.gypi index 1670328..1673b90 100644 --- a/ui/ui_gfx.gypi +++ b/ui/ui_gfx.gypi @@ -3,12 +3,6 @@ # found in the LICENSE file. { - 'variables': { - 'grit_info_cmd': ['python', '../tools/grit/grit_info.py', - '<@(grit_defines)'], - 'grit_cmd': ['python', '../tools/grit/grit.py'], - 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx', - }, 'targets': [ { # TODO(rsesek): Remove this target once ui_unittests is run on the @@ -164,37 +158,19 @@ 'target_name': 'gfx_resources', 'type': 'none', 'msvs_guid' : '5738AE53-E919-4987-A2EF-15FDBD8F90F6', + 'variables': { + 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx', + }, 'actions': [ { 'action_name': 'gfx_resources', 'variables': { - 'input_path': 'gfx/gfx_resources.grd', + 'grit_grd_file': 'gfx/gfx_resources.grd', }, - 'inputs': [ - '<!@(<(grit_info_cmd) --inputs <(input_path))', - ], - 'outputs': [ - '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))', - ], - 'action': [ - '<@(grit_cmd)', - '-i', '<(input_path)', 'build', - '-o', '<(grit_out_dir)', - '<@(grit_defines)', - ], - 'message': 'Generating resources from <(input_path)', + 'includes': [ '../build/grit_action.gypi' ], }, ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(grit_out_dir)', - ], - }, - 'conditions': [ - ['OS=="win"', { - 'dependencies': ['../build/win/system.gyp:cygwin'], - }], - ], + 'includes': [ '../build/grit_target.gypi' ], }, ], |