OLD | NEW |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 # TODO: remove this helper when we have loops in GYP | 7 # TODO: remove this helper when we have loops in GYP |
8 'apply_locales_cmd': ['python', '../chrome/tools/build/apply_locales.py',], | 8 'apply_locales_cmd': ['python', '../chrome/tools/build/apply_locales.py',], |
9 'chromium_code': 1, | 9 'chromium_code': 1, |
| 10 'grit_info_cmd': ['python', '../tools/grit/grit_info.py',], |
| 11 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', |
| 12 'grit_cmd': ['python', '../tools/grit/grit.py'], |
| 13 'localizable_resources': [ |
| 14 'resources/app_locale_settings.grd', |
| 15 'resources/app_strings.grd', |
| 16 ], |
10 }, | 17 }, |
11 'target_defaults': { | 18 'target_defaults': { |
12 'sources/': [ | 19 'sources/': [ |
13 ['exclude', '/(cocoa|gtk|win)/'], | 20 ['exclude', '/(cocoa|gtk|win)/'], |
14 ['exclude', '_(cocoa|gtk|linux|mac|posix|skia|win|x)\\.(cc|mm?)$'], | 21 ['exclude', '_(cocoa|gtk|linux|mac|posix|skia|win|x)\\.(cc|mm?)$'], |
15 ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], | 22 ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], |
16 ], | 23 ], |
17 'conditions': [ | 24 'conditions': [ |
18 ['OS=="linux"', {'sources/': [ | 25 ['OS=="linux"', {'sources/': [ |
19 ['include', '/gtk/'], | 26 ['include', '/gtk/'], |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 }, | 241 }, |
235 { | 242 { |
236 'target_name': 'app_strings', | 243 'target_name': 'app_strings', |
237 'msvs_guid': 'AE9BF4A2-19C5-49D8-BB1A-F28496DD7051', | 244 'msvs_guid': 'AE9BF4A2-19C5-49D8-BB1A-F28496DD7051', |
238 'type': 'none', | 245 'type': 'none', |
239 'rules': [ | 246 'rules': [ |
240 { | 247 { |
241 'rule_name': 'grit', | 248 'rule_name': 'grit', |
242 'extension': 'grd', | 249 'extension': 'grd', |
243 'inputs': [ | 250 'inputs': [ |
244 '../tools/grit/grit.py', | 251 '<!@(<(grit_info_cmd) --inputs <(localizable_resources))', |
245 ], | 252 ], |
246 'variables': { | |
247 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', | |
248 }, | |
249 'outputs': [ | 253 'outputs': [ |
250 '<(SHARED_INTERMEDIATE_DIR)/app/grit/<(RULE_INPUT_ROOT).h', | 254 '<(grit_out_dir)/<(RULE_INPUT_ROOT)/grit/<(RULE_INPUT_ROOT).h', |
251 # TODO: remove this helper when we have loops in GYP | 255 # TODO: remove this helper when we have loops in GYP |
252 '>!@(<(apply_locales_cmd) \'<(SHARED_INTERMEDIATE_DIR)/app/<(RULE_IN
PUT_ROOT)_ZZLOCALE.pak\' <(locales))', | 256 '>!@(<(apply_locales_cmd) \'<(grit_out_dir)/<(RULE_INPUT_ROOT)/<(RUL
E_INPUT_ROOT)_ZZLOCALE.pak\' <(locales))', |
253 ], | 257 ], |
254 'action': ['python', '<@(_inputs)', '-i', '<(RULE_INPUT_PATH)', | 258 'action': ['<@(grit_cmd)', '-i', '<(RULE_INPUT_PATH)', |
255 'build', '-o', '<(grit_out_dir)'], | 259 'build', '-o', '<(grit_out_dir)/<(RULE_INPUT_ROOT)'], |
256 'message': 'Generating resources from <(RULE_INPUT_PATH)', | 260 'message': 'Generating resources from <(RULE_INPUT_PATH)', |
257 'conditions': [ | 261 'conditions': [ |
258 ['use_titlecase_in_grd_files==1', { | 262 ['use_titlecase_in_grd_files==1', { |
259 'action': ['-D', 'use_titlecase'], | 263 'action': ['-D', 'use_titlecase'], |
260 }], | 264 }], |
261 ], | 265 ], |
262 }, | 266 }, |
263 ], | 267 ], |
264 'sources': [ | 268 'sources': [ |
265 # Localizable resources. | 269 '<@(localizable_resources)', |
266 'resources/app_locale_settings.grd', | |
267 'resources/app_strings.grd', | |
268 ], | 270 ], |
269 'direct_dependent_settings': { | 271 'direct_dependent_settings': { |
270 'include_dirs': [ | 272 'include_dirs': [ |
271 '<(SHARED_INTERMEDIATE_DIR)/app', | 273 '<(grit_out_dir)/app_locale_settings', |
| 274 '<(grit_out_dir)/app_strings', |
272 ], | 275 ], |
273 }, | 276 }, |
274 'conditions': [ | 277 'conditions': [ |
275 ['OS=="win"', { | 278 ['OS=="win"', { |
276 'dependencies': ['../build/win/system.gyp:cygwin'], | 279 'dependencies': ['../build/win/system.gyp:cygwin'], |
277 }], | 280 }], |
278 ], | 281 ], |
279 }, | 282 }, |
280 { | 283 { |
281 'target_name': 'app_resources', | 284 'target_name': 'app_resources', |
282 'type': 'none', | 285 'type': 'none', |
283 'msvs_guid': '3FBC4235-3FBD-46DF-AEDC-BADBBA13A095', | 286 'msvs_guid': '3FBC4235-3FBD-46DF-AEDC-BADBBA13A095', |
284 'variables': { | |
285 'grit_path': '../tools/grit/grit.py', | |
286 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/app', | |
287 }, | |
288 'actions': [ | 287 'actions': [ |
289 { | 288 { |
290 'action_name': 'app_resources', | 289 'action_name': 'app_resources', |
291 'variables': { | 290 'variables': { |
292 'input_path': 'resources/app_resources.grd', | 291 'input_path': 'resources/app_resources.grd', |
293 }, | 292 }, |
294 'inputs': [ | 293 'inputs': [ |
295 '<(input_path)', | 294 '<!@(<(grit_info_cmd) --inputs <(input_path))', |
296 ], | 295 ], |
297 'outputs': [ | 296 'outputs': [ |
298 '<(grit_out_dir)/grit/app_resources.h', | 297 '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)/app_resources\' <(
input_path))', |
299 '<(grit_out_dir)/app_resources.pak', | |
300 '<(grit_out_dir)/app_resources.rc', | |
301 ], | 298 ], |
302 'action': ['python', '<(grit_path)', '-i', '<(input_path)', 'build', '
-o', '<(grit_out_dir)'], | 299 'action': ['<@(grit_cmd)', |
| 300 '-i', '<(input_path)', 'build', |
| 301 '-o', '<(grit_out_dir)/app_resources'], |
303 'message': 'Generating resources from <(input_path)', | 302 'message': 'Generating resources from <(input_path)', |
304 }, | 303 }, |
305 ], | 304 ], |
306 'direct_dependent_settings': { | 305 'direct_dependent_settings': { |
307 'include_dirs': [ | 306 'include_dirs': [ |
308 '<(SHARED_INTERMEDIATE_DIR)/app', | 307 '<(grit_out_dir)/app_resources', |
309 ], | 308 ], |
310 }, | 309 }, |
311 'conditions': [ | 310 'conditions': [ |
312 ['OS=="win"', { | 311 ['OS=="win"', { |
313 'dependencies': ['../build/win/system.gyp:cygwin'], | 312 'dependencies': ['../build/win/system.gyp:cygwin'], |
314 }], | 313 }], |
315 ], | 314 ], |
316 }, | 315 }, |
317 { | 316 { |
318 'target_name': 'app_id', | 317 'target_name': 'app_id', |
319 'type': 'none', | 318 'type': 'none', |
320 'msvs_guid': '83100055-172B-49EA-B422-B1A92B627D37', | 319 'msvs_guid': '83100055-172B-49EA-B422-B1A92B627D37', |
321 'conditions': [ | 320 'conditions': [ |
322 ['OS=="win"', | 321 ['OS=="win"', |
323 { | 322 { |
324 'actions': [ | 323 'actions': [ |
325 { | 324 { |
326 'action_name': 'appid', | 325 'action_name': 'appid', |
327 'variables': { | 326 'variables': { |
328 'appid_py': '../chrome/tools/build/appid.py', | 327 'appid_py': '../chrome/tools/build/appid.py', |
329 }, | 328 }, |
330 'conditions': [ | 329 'conditions': [ |
331 [ 'branding=="Chrome"', { | 330 [ 'branding=="Chrome"', { |
332 'variables': { | 331 'variables': { |
333 'appid_value': '<(google_update_appid)', | 332 'appid_value': '<(google_update_appid)', |
334 }, | 333 }, |
335 }, { # else | 334 }, { # else |
336 'variables': { | 335 'variables': { |
337 'appid_value': '', | 336 'appid_value': '', |
338 }, | 337 }, |
339 }], | 338 }], |
340 ], | 339 ], |
341 'inputs': [ | 340 'inputs': [ |
342 '<(appid_py)', | 341 '<(appid_py)', |
343 ], | 342 ], |
344 'outputs': [ | 343 'outputs': [ |
345 '<(SHARED_INTERMEDIATE_DIR)/chrome/appid.h', | 344 '<(SHARED_INTERMEDIATE_DIR)/chrome/appid.h', |
346 'tools/build/_always_run_appid_py.marker', | 345 'tools/build/_always_run_appid_py.marker', |
347 ], | 346 ], |
348 'action': [ | 347 'action': [ |
349 'python', | 348 'python', |
350 '<(appid_py)', | 349 '<(appid_py)', |
351 '-a', '<(appid_value)', | 350 '-a', '<(appid_value)', |
352 '-o', '<(SHARED_INTERMEDIATE_DIR)/chrome/appid.h', | 351 '-o', '<(SHARED_INTERMEDIATE_DIR)/chrome/appid.h', |
353 ], | 352 ], |
354 'process_outputs_as_sources': 1, | 353 'process_outputs_as_sources': 1, |
355 'message': 'Generating appid information in <(SHARED_INTERMEDIAT
E_DIR)/chrome/appid.h' | 354 'message': 'Generating appid information in <(SHARED_INTERMEDIAT
E_DIR)/chrome/appid.h' |
356 }, | 355 }, |
357 ], | 356 ], |
358 }, | 357 }, |
359 ], | 358 ], |
360 ], | 359 ], |
361 }, | 360 }, |
362 ], | 361 ], |
363 } | 362 } |
OLD | NEW |