summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 19:04:43 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 19:04:43 +0000
commitbb6aba3a90b104b7df841f15d00f6f31d580ac71 (patch)
tree3e1ab96bcaaf9114acc6907f99de2fe1095c6ec8 /chrome
parent674731cacddac05a7ddf1f333defe22bb5be8e1b (diff)
downloadchromium_src-bb6aba3a90b104b7df841f15d00f6f31d580ac71.zip
chromium_src-bb6aba3a90b104b7df841f15d00f6f31d580ac71.tar.gz
chromium_src-bb6aba3a90b104b7df841f15d00f6f31d580ac71.tar.bz2
Refactor grit -D flags into a gyp variable so we don't
have to repeat the logic for it in a bunch of different places. I had to add another level of variables{} so I could use use_titlecase_in_grd_files in a condition. I also removed some quotes around default values since that seems to be the more common way to express boolean values. BUG=68028 Review URL: http://codereview.chromium.org/6070011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/chrome.gyp60
-rw-r--r--chrome/default_plugin/default_plugin.gyp8
2 files changed, 10 insertions, 58 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index a466ca4..84d4446 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -202,17 +202,7 @@
'build', '-o', '<(grit_out_dir)',
'-D', '<(chrome_build)',
'-E', '<(branded_env)',
- ],
- 'conditions': [
- ['chromeos==1', {
- 'action': ['-D', 'chromeos'],
- }],
- ['toolkit_views==1', {
- 'action': ['-D', 'toolkit_views'],
- }],
- ['use_titlecase_in_grd_files==1', {
- 'action': ['-D', 'use_titlecase'],
- }],
+ '<@(grit_defines)',
],
'message': 'Generating resources from <(RULE_INPUT_PATH)',
},
@@ -289,15 +279,8 @@
'action': ['<@(grit_cmd)', '-i',
'<(RULE_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'],
- }],
- ],
+ '-D', '<(chrome_build)',
+ '<@(grit_defines)' ],
'message': 'Generating resources from <(RULE_INPUT_PATH)',
},
],
@@ -345,18 +328,8 @@
'<@(grit_cmd)',
'-i', '<(input_path)', 'build',
'-o', '<(grit_out_dir)',
- '-D', '<(chrome_build)'
- ],
- 'conditions': [
- ['chromeos==1', {
- 'action': ['-D', 'chromeos'],
- }],
- ['toolkit_views==1', {
- 'action': ['-D', 'toolkit_views'],
- }],
- ['use_titlecase_in_grd_files==1', {
- 'action': ['-D', 'use_titlecase'],
- }],
+ '-D', '<(chrome_build)',
+ '<@(grit_defines)',
],
'message': 'Generating resources from <(input_path)',
},
@@ -403,15 +376,8 @@
'<@(grit_cmd)',
'-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'],
- }],
+ '-D', '<(chrome_build)',
+ '<@(grit_defines)',
],
'message': 'Generating resources from <(input_path)',
},
@@ -475,17 +441,7 @@
'build', '-o', '<(grit_out_dir)',
'-D', '<(chrome_build)',
'-E', '<(branded_env)',
- ],
- 'conditions': [
- ['chromeos==1', {
- 'action': ['-D', 'chromeos'],
- }],
- ['use_titlecase_in_grd_files==1', {
- 'action': ['-D', 'use_titlecase'],
- }],
- ['touchui==1', {
- 'action': ['-D', 'touchui'],
- }],
+ '<@(grit_defines)',
],
'message': 'Generating resources from <(RULE_INPUT_PATH)',
},
diff --git a/chrome/default_plugin/default_plugin.gyp b/chrome/default_plugin/default_plugin.gyp
index a0d8a6d..e82f15e 100644
--- a/chrome/default_plugin/default_plugin.gyp
+++ b/chrome/default_plugin/default_plugin.gyp
@@ -79,12 +79,8 @@
],
'action': ['<@(grit_cmd)',
'-i', '<(input_path)', 'build',
- '-o', '<(grit_out_dir)/default_plugin_resources'],
- 'conditions': [
- ['toolkit_views==1', {
- 'action': ['-D', 'toolkit_views'],
- }],
- ],
+ '-o', '<(grit_out_dir)/default_plugin_resources',
+ '<@(grit_defines)'],
'message': 'Generating resources from <(input_path)',
},
],