Do not consume keys for DISABLE_CAPS_LOCK when caps lock is off.
[chromium-blink-merge.git] / chrome / chrome.gyp
blob4dce369aafb8c988ffaa731d1bbbf840a0c417ad
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5   'variables': {
6     'chromium_code': 1,
8     # Define the common dependencies that contain all the actual
9     # Chromium functionality.  This list gets pulled in below by
10     # the link of the actual chrome (or chromium) executable on
11     # Linux or Mac, and into chrome.dll on Windows.
12     'chromium_dependencies': [
13       'common',
14       'browser',
15       'debugger',
16       'plugin',
17       'renderer',
18       'utility',
19       '../content/content.gyp:content_app',
20       '../content/content.gyp:content_gpu',
21       '../content/content.gyp:content_ppapi_plugin',
22       '../content/content.gyp:content_worker',
23       '../sync/sync.gyp:syncapi_core',
24       '../printing/printing.gyp:printing',
25       '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:inspector_resources',
26     ],
27     'allocator_target': '../base/allocator/allocator.gyp:allocator',
28     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
29     'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
30     'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'],
31     # TODO: remove this helper when we have loops in GYP
32     'apply_locales_cmd': ['python', '<(DEPTH)/build/apply_locales.py'],
33     'conditions': [
34       ['OS=="win"', {
35         'nacl_defines': [
36           'NACL_WINDOWS=1',
37           'NACL_LINUX=0',
38           'NACL_OSX=0',
39         ],
40         'platform_locale_settings_grd':
41             'app/resources/locale_settings_win.grd',
42       },],
43       ['OS!="android"', {
44         'chromium_dependencies': [
45           # Android doesn't use the service process (only needed for print).
46           'service',
47         ],
48       }],
49       ['OS=="linux"', {
50         'nacl_defines': [
51           'NACL_WINDOWS=0',
52           'NACL_LINUX=1',
53           'NACL_OSX=0',
54         ],
55         'conditions': [
56           ['chromeos==1', {
57             'platform_locale_settings_grd':
58                 'app/resources/locale_settings_cros.grd',
59           }, {  # chromeos==0
60             'platform_locale_settings_grd':
61                 'app/resources/locale_settings_linux.grd',
62           }],
63         ],
64       },],
65       ['os_posix == 1 and OS != "mac" and OS != "linux"', {
66         'platform_locale_settings_grd':
67             'app/resources/locale_settings_linux.grd',
68       },],
69       ['OS=="mac"', {
70         'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
71         'nacl_defines': [
72           'NACL_WINDOWS=0',
73           'NACL_LINUX=0',
74           'NACL_OSX=1',
75         ],
76         'platform_locale_settings_grd':
77             'app/resources/locale_settings_mac.grd',
78         'conditions': [
79           ['branding=="Chrome"', {
80             'mac_bundle_id': 'com.google.Chrome',
81             'mac_creator': 'rimZ',
82             # The policy .grd file also needs the bundle id.
83             'grit_defines': ['-D', 'mac_bundle_id=com.google.Chrome'],
84           }, {  # else: branding!="Chrome"
85             'mac_bundle_id': 'org.chromium.Chromium',
86             'mac_creator': 'Cr24',
87             # The policy .grd file also needs the bundle id.
88             'grit_defines': ['-D', 'mac_bundle_id=org.chromium.Chromium'],
89           }],  # branding
90         ],  # conditions
91       }],  # OS=="mac"
92       # TODO(mcgrathr): This duplicates native_client/build/common.gypi;
93       # we should figure out a way to unify the settings.
94       ['target_arch=="ia32"', {
95         'nacl_defines': [
96           'NACL_TARGET_SUBARCH=32',
97           'NACL_TARGET_ARCH=x86',
98           'NACL_BUILD_SUBARCH=32',
99           'NACL_BUILD_ARCH=x86',
100         ],
101       }],
102       ['target_arch=="x64"', {
103         'nacl_defines': [
104           'NACL_TARGET_SUBARCH=64',
105           'NACL_TARGET_ARCH=x86',
106           'NACL_BUILD_SUBARCH=64',
107           'NACL_BUILD_ARCH=x86',
108         ],
109       }],
110       ['target_arch=="arm"', {
111         'nacl_defines': [
112           'NACL_BUILD_ARCH=arm',
113           'NACL_BUILD_SUBARCH=32',
114           'NACL_TARGET_ARCH=arm',
115           'NACL_TARGET_SUBARCH=32',
116         ],
117       }],
118     ],  # conditions
119   },  # variables
120   'includes': [
121     # Place some targets in gypi files to reduce contention on this file.
122     # By using an include, we keep everything in a single xcodeproj file.
123     # Note on Win64 targets: targets that end with win64 be used
124     # on 64-bit Windows only. Targets that end with nacl_win64 should be used
125     # by Native Client only.
126     '../build/win_precompile.gypi',
127     'app/policy/policy_templates.gypi',
128     'chrome_browser.gypi',
129     'chrome_browser_extensions.gypi',
130     'chrome_browser_ui.gypi',
131     'chrome_common.gypi',
132     'chrome_dll.gypi',
133     'chrome_exe.gypi',
134     'chrome_installer.gypi',
135     'chrome_installer_util.gypi',
136     'chrome_renderer.gypi',
137     'chrome_tests.gypi',
138     'nacl.gypi',
139     'version.gypi',
140   ],
141   'targets': [
142     {
143       'target_name': 'default_extensions',
144       'type': 'none',
145       'conditions': [
146         ['OS=="win"', {
147           'copies': [
148             {
149               'destination': '<(PRODUCT_DIR)/extensions',
150               'files': [
151                 'browser/extensions/default_extensions/external_extensions.json'
152               ]
153             }
154           ],
155         }],
156         ['OS=="linux" and chromeos==1 and branding=="Chrome"', {
157           'copies': [
158             {
159               'destination': '<(PRODUCT_DIR)/extensions',
160               'files': [
161                 '>!@(ls browser/extensions/default_extensions/chromeos/cache/*)'
162               ]
163             }
164           ],
165         }],
166       ],
167     },
168     {
169       'target_name': 'debugger',
170       'type': 'static_library',
171       'variables': { 'enable_wexit_time_destructors': 1, },
172       'dependencies': [
173         'chrome_resources.gyp:chrome_extra_resources',
174         'chrome_resources.gyp:chrome_resources',
175         'chrome_resources.gyp:chrome_strings',
176         'chrome_resources.gyp:theme_resources',
177         '../base/base.gyp:base',
178         '../content/content.gyp:content_browser',
179         '../net/net.gyp:http_server',
180         '../net/net.gyp:net',
181         '../skia/skia.gyp:skia',
182         '../third_party/icu/icu.gyp:icui18n',
183         '../third_party/icu/icu.gyp:icuuc',
184         '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
185       ],
186       'include_dirs': [
187         '..',
188       ],
189       'sources': [
190         'browser/debugger/browser_list_tabcontents_provider.cc',
191         'browser/debugger/browser_list_tabcontents_provider.h',
192         'browser/debugger/devtools_file_helper.cc',
193         'browser/debugger/devtools_file_helper.h',
194         'browser/debugger/devtools_toggle_action.h',
195         'browser/debugger/devtools_window.cc',
196         'browser/debugger/devtools_window.h',
197         'browser/debugger/remote_debugging_server.cc',
198         'browser/debugger/remote_debugging_server.h',
199       ],
200       'conditions': [
201         ['toolkit_uses_gtk == 1', {
202           'dependencies': [
203             '../build/linux/system.gyp:gtk',
204           ],
205         }],
206         ['OS=="android"', {
207           'sources!': [
208             'browser/debugger/browser_list_tabcontents_provider.cc',
209             'browser/debugger/devtools_window.cc',
210             'browser/debugger/remote_debugging_server.cc',
211           ],
212         }],
213         ['debug_devtools==1', {
214           'defines': [
215             'DEBUG_DEVTOOLS=1',
216            ],
217         }],
218       ],
219     },
220     {
221       'target_name': 'plugin',
222       'type': 'static_library',
223       'variables': { 'enable_wexit_time_destructors': 1, },
224       'dependencies': [
225         'chrome_resources.gyp:chrome_strings',
226         '../base/base.gyp:base',
227         '../content/content.gyp:content_plugin',
228       ],
229       'sources': [
230         'plugin/chrome_content_plugin_client.cc',
231         'plugin/chrome_content_plugin_client.h',
232       ],
233       'include_dirs': [
234         '..',
235         '<(grit_out_dir)',
236       ],
237     },
238     {
239       'target_name': 'utility',
240       'type': 'static_library',
241       'variables': { 'enable_wexit_time_destructors': 1, },
242       'dependencies': [
243         '../base/base.gyp:base',
244         '../content/content.gyp:content_utility',
245         '../skia/skia.gyp:skia',
246       ],
247       'sources': [
248         'utility/chrome_content_utility_client.cc',
249         'utility/chrome_content_utility_client.h',
250         'utility/profile_import_handler.cc',
251         'utility/profile_import_handler.h',
252       ],
253       'include_dirs': [
254         '..',
255       ],
256       'conditions': [
257         ['toolkit_uses_gtk == 1', {
258           'dependencies': [
259             '../build/linux/system.gyp:gtk',
260           ],
261         }],
262         ['OS=="android"', {
263           'sources!': [
264             'utility/profile_import_handler.cc',
265           ],
266         }],
267       ],
268     },
269     {
270       'target_name': 'service',
271       'type': 'static_library',
272       'variables': { 'enable_wexit_time_destructors': 1, },
273       'dependencies': [
274         'chrome_resources.gyp:chrome_strings',
275         'common',
276         'common_net',
277         '../base/base.gyp:base',
278         '../google_apis/google_apis.gyp:google_apis',
279         '../jingle/jingle.gyp:notifier',
280         '../net/net.gyp:net',
281         '../printing/printing.gyp:printing',
282         '../skia/skia.gyp:skia',
283         '../third_party/libjingle/libjingle.gyp:libjingle',
284       ],
285       'sources': [
286         'service/chrome_service_application_mac.h',
287         'service/chrome_service_application_mac.mm',
288         'service/service_ipc_server.cc',
289         'service/service_ipc_server.h',
290         'service/service_main.cc',
291         'service/service_process.cc',
292         'service/service_process.h',
293         'service/service_process_prefs.cc',
294         'service/service_process_prefs.h',
295         'service/service_utility_process_host.cc',
296         'service/service_utility_process_host.h',
297         'service/cloud_print/cloud_print_auth.cc',
298         'service/cloud_print/cloud_print_auth.h',
299         'service/cloud_print/cloud_print_connector.cc',
300         'service/cloud_print/cloud_print_connector.h',
301         'service/cloud_print/cloud_print_consts.cc',
302         'service/cloud_print/cloud_print_consts.h',
303         'service/cloud_print/cloud_print_helpers.cc',
304         'service/cloud_print/cloud_print_helpers.h',
305         'service/cloud_print/cloud_print_proxy.cc',
306         'service/cloud_print/cloud_print_proxy.h',
307         'service/cloud_print/cloud_print_proxy_backend.cc',
308         'service/cloud_print/cloud_print_proxy_backend.h',
309         'service/cloud_print/cloud_print_token_store.cc',
310         'service/cloud_print/cloud_print_token_store.h',
311         'service/cloud_print/cloud_print_url_fetcher.cc',
312         'service/cloud_print/cloud_print_url_fetcher.h',
313         'service/cloud_print/cloud_print_wipeout.cc',
314         'service/cloud_print/cloud_print_wipeout.h',
315         'service/cloud_print/connector_settings.cc',
316         'service/cloud_print/connector_settings.h',
317         'service/cloud_print/job_status_updater.cc',
318         'service/cloud_print/job_status_updater.h',
319         'service/cloud_print/print_system_dummy.cc',
320         'service/cloud_print/print_system.cc',
321         'service/cloud_print/print_system.h',
322         'service/cloud_print/printer_job_handler.cc',
323         'service/cloud_print/printer_job_handler.h',
324         'service/gaia/service_gaia_authenticator.cc',
325         'service/gaia/service_gaia_authenticator.h',
326         'service/net/service_url_request_context.cc',
327         'service/net/service_url_request_context.h',
328       ],
329       'include_dirs': [
330         '..',
331       ],
332       'conditions': [
333         ['OS=="win"', {
334           'defines': [
335             # CP_PRINT_SYSTEM_AVAILABLE disables default dummy implementation
336             # of cloud print system, and allows to use custom implementaiton.
337             'CP_PRINT_SYSTEM_AVAILABLE',
338           ],
339           'sources': [
340             'service/cloud_print/print_system_win.cc',
341           ],
342         }],
343         ['toolkit_uses_gtk == 1', {
344           'dependencies': [
345             '../build/linux/system.gyp:gtk',
346           ],
347         }],
348         ['use_cups==1', {
349           'dependencies': [
350             '../printing/printing.gyp:cups',
351           ],
352           'defines': [
353             # CP_PRINT_SYSTEM_AVAILABLE disables default dummy implementation
354             # of cloud print system, and allows to use custom implementaiton.
355             'CP_PRINT_SYSTEM_AVAILABLE',
356           ],
357           'sources': [
358             'service/cloud_print/print_system_cups.cc',
359           ],
360         }],
361       ],
362     },
363     {
364       'target_name': 'ipclist',
365       'type': 'executable',
366       'variables': { 'enable_wexit_time_destructors': 1, },
367       'dependencies': [
368         'test_support_common',
369         '../skia/skia.gyp:skia',
370       ],
371       'include_dirs': [
372          '..',
373       ],
374       'sources': [
375         'tools/ipclist/ipclist.cc',
376       ],
377     },
378   ],
379   'conditions': [
380     ['OS=="mac"',
381       { 'targets': [
382         {
383           'target_name': 'helper_app',
384           'type': 'executable',
385           'variables': { 'enable_wexit_time_destructors': 1, },
386           'product_name': '<(mac_product_name) Helper',
387           'mac_bundle': 1,
388           'dependencies': [
389             'chrome_dll',
390             'infoplist_strings_tool',
391           ],
392           'sources': [
393             # chrome_exe_main_mac.cc's main() is the entry point for
394             # the "chrome" (browser app) target.  All it does is jump
395             # to chrome_dll's ChromeMain.  This is appropriate for
396             # helper processes too, because the logic to discriminate
397             # between process types at run time is actually directed
398             # by the --type command line argument processed by
399             # ChromeMain.  Sharing chrome_exe_main_mac.cc with the
400             # browser app will suffice for now.
401             'app/chrome_exe_main_mac.cc',
402             'app/helper-Info.plist',
403           ],
404           # TODO(mark): Come up with a fancier way to do this.  It should only
405           # be necessary to list helper-Info.plist once, not the three times it
406           # is listed here.
407           'mac_bundle_resources!': [
408             'app/helper-Info.plist',
409           ],
410           # TODO(mark): For now, don't put any resources into this app.  Its
411           # resources directory will be a symbolic link to the browser app's
412           # resources directory.
413           'mac_bundle_resources/': [
414             ['exclude', '.*'],
415           ],
416           'xcode_settings': {
417             'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
418             'CHROMIUM_SHORT_NAME': '<(branding)',
419             'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
420             'INFOPLIST_FILE': 'app/helper-Info.plist',
421           },
422           'postbuilds': [
423             {
424               # The helper doesn't have real localizations, it just has
425               # empty .lproj directories, which is enough to convince Cocoa
426               # that anything running out of the helper .app supports those
427               # languages.
428               'postbuild_name': 'Make Empty Localizations',
429               'variables': {
430                 'locale_dirs': [
431                   '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
432                 ],
433               },
434               'action': [
435                 'tools/build/mac/make_locale_dirs.sh',
436                 '<@(locale_dirs)',
437               ],
438             },
439             {
440               # The framework (chrome_dll) defines its load-time path
441               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
442               # (chrome).  A different relative path needs to be used in
443               # helper_app.
444               'postbuild_name': 'Fix Framework Link',
445               'action': [
446                 'install_name_tool',
447                 '-change',
448                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
449                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
450                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
451               ],
452             },
453             {
454               # Modify the Info.plist as needed.  The script explains why this
455               # is needed.  This is also done in the chrome and chrome_dll
456               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
457               # are used because Breakpad, Keystone, and SCM keys are
458               # never placed into the helper.
459               'postbuild_name': 'Tweak Info.plist',
460               'action': ['<(tweak_info_plist_path)',
461                          '--breakpad=0',
462                          '--keystone=0',
463                          '--scm=0'],
464             },
465             {
466               # Make sure there isn't any Objective-C in the helper app's
467               # executable.
468               'postbuild_name': 'Verify No Objective-C',
469               'action': [
470                 '../build/mac/verify_no_objc.sh',
471               ],
472             },
473           ],
474           'conditions': [
475             ['mac_breakpad==1', {
476               'variables': {
477                 # A real .dSYM is needed for dump_syms to operate on.
478                 'mac_real_dsym': 1,
479               },
480               'xcode_settings': {
481                 # With mac_real_dsym set, strip_from_xcode won't be used.
482                 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
483                 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
484               },
485             }],
486             ['asan==1', {
487               'xcode_settings': {
488                 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
489                 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
490               },
491             }],
492             ['component=="shared_library"', {
493               'xcode_settings': {
494                 'LD_RUNPATH_SEARCH_PATHS': [
495                   # Get back from Chromium.app/Contents/Versions/V/
496                   #                                    Helper.app/Contents/MacOS
497                   '@loader_path/../../../../../../..',
498                 ],
499               },
500             }],
501           ],
502         },  # target helper_app
503         {
504           # A library containing the actual code for the app mode app, shared
505           # by unit tests.
506           'target_name': 'app_mode_app_support',
507           'type': 'static_library',
508           'variables': { 'enable_wexit_time_destructors': 1, },
509           'product_name': 'app_mode_app_support',
510           'dependencies': [
511             '../base/base.gyp:base',
512           ],
513           'sources': [
514             'common/mac/app_mode_chrome_locator.h',
515             'common/mac/app_mode_chrome_locator.mm',
516             'common/mac/app_mode_common.h',
517             'common/mac/app_mode_common.mm',
518           ],
519           'include_dirs': [
520             '..',
521           ],
522         },  # target app_mode_app_support
523         {
524           # This produces the template for app mode loader bundles. It's a
525           # template in the sense that parts of it need to be "filled in" by
526           # Chrome before it can be executed.
527           'target_name': 'app_mode_app',
528           'type': 'executable',
529           'mac_bundle' : 1,
530           'variables': { 'enable_wexit_time_destructors': 1, },
531           'product_name': 'app_mode_loader',
532           'dependencies': [
533             'app_mode_app_support',
534             'infoplist_strings_tool',
535           ],
536           'sources': [
537             'app/app_mode_loader_mac.mm',
538             'app/app_mode-Info.plist',
539           ],
540           'include_dirs': [
541             '..',
542           ],
543           'link_settings': {
544             'libraries': [
545               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
546               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
547             ],
548           },
549           'mac_bundle_resources!': [
550             'app/app_mode-Info.plist',
551           ],
552           'mac_bundle_resources/': [
553             ['exclude', '.*'],
554           ],
555           'xcode_settings': {
556             'INFOPLIST_FILE': 'app/app_mode-Info.plist',
557             'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
558           },
559           'postbuilds' : [
560             {
561               # Modify the Info.plist as needed.  The script explains why this
562               # is needed.  This is also done in the chrome and chrome_dll
563               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
564               # are used because Breakpad, Keystone, and SCM keys are
565               # never placed into the app mode loader.
566               'postbuild_name': 'Tweak Info.plist',
567               'action': ['<(tweak_info_plist_path)',
568                          '--breakpad=0',
569                          '--keystone=0',
570                          '--scm=0'],
571             },
572           ],
573         },  # target app_mode_app
574         {
575           # Convenience target to build a disk image.
576           'target_name': 'build_app_dmg',
577           # Don't place this in the 'all' list; most won't want it.
578           # In GYP, booleans are 0/1, not True/False.
579           'suppress_wildcard': 1,
580           'type': 'none',
581           'dependencies': [
582             'chrome',
583           ],
584           'variables': {
585             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
586             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
588             'conditions': [
589               # This duplicates the output path from build_app_dmg.
590               ['branding=="Chrome"', {
591                 'dmg_name': 'GoogleChrome.dmg',
592               }, { # else: branding!="Chrome"
593                 'dmg_name': 'Chromium.dmg',
594               }],
595             ],
596           },
597           'actions': [
598             {
599               'inputs': [
600                 '<(build_app_dmg_script_path)',
601                 '<(pkg_dmg_script_path)',
602                 '<(PRODUCT_DIR)/<(mac_product_name).app',
603               ],
604               'outputs': [
605                 '<(PRODUCT_DIR)/<(dmg_name)',
606               ],
607               'action_name': 'build_app_dmg',
608               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
609             },
610           ],  # 'actions'
611         },
612         {
613           # Dummy target to allow chrome to require plugin_carbon_interpose to
614           # build without actually linking to the resulting library.
615           'target_name': 'interpose_dependency_shim',
616           'type': 'executable',
617           'variables': { 'enable_wexit_time_destructors': 1, },
618           'dependencies': [
619             'plugin_carbon_interpose',
620           ],
621           # In release, we end up with a strip step that is unhappy if there is
622           # no binary. Rather than check in a new file for this temporary hack,
623           # just generate a source file on the fly.
624           'actions': [
625             {
626               'action_name': 'generate_stub_main',
627               'process_outputs_as_sources': 1,
628               'inputs': [],
629               'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ],
630               'action': [
631                 'bash', '-c',
632                 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c'
633               ],
634             },
635           ],
636         },
637         {
638           # dylib for interposing Carbon calls in the plugin process.
639           'target_name': 'plugin_carbon_interpose',
640           'type': 'shared_library',
641           'variables': { 'enable_wexit_time_destructors': 1, },
642           # This target must not depend on static libraries, else the code in
643           # those libraries would appear twice in plugin processes: Once from
644           # Chromium Framework, and once from this dylib.
645           'dependencies': [
646             'chrome_dll',
647           ],
648           'conditions': [
649             ['component=="shared_library"', {
650               'dependencies': [
651                 '../webkit/support/webkit_support.gyp:glue',
652                 '../content/content.gyp:content_plugin',
653               ],
654               'xcode_settings': {
655                 'LD_RUNPATH_SEARCH_PATHS': [
656                   # Get back from Chromium.app/Contents/Versions/V
657                   '@loader_path/../../../..',
658                 ],
659               },
660             }],
661           ],
662           'sources': [
663             '../content/plugin/plugin_carbon_interpose_mac.cc',
664           ],
665           'include_dirs': [
666             '..',
667           ],
668           'link_settings': {
669             'libraries': [
670               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
671             ],
672           },
673           'xcode_settings': {
674             'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
675             'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
676             'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
677           },
678           'postbuilds': [
679             {
680               # The framework (chrome_dll) defines its load-time path
681               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
682               # (chrome).  A different relative path needs to be used in
683               # plugin_carbon_interpose, which runs in the helper_app.
684               'postbuild_name': 'Fix Framework Link',
685               'action': [
686                 'install_name_tool',
687                 '-change',
688                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
689                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
690                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
691               ],
692             },
693           ],
694         },
695         {
696           'target_name': 'infoplist_strings_tool',
697           'type': 'executable',
698           'variables': { 'enable_wexit_time_destructors': 1, },
699           'dependencies': [
700             'chrome_resources.gyp:chrome_strings',
701             '../base/base.gyp:base',
702             '../ui/ui.gyp:ui',
703           ],
704           'include_dirs': [
705             '<(grit_out_dir)',
706           ],
707           'sources': [
708             'tools/mac_helpers/infoplist_strings_util.mm',
709           ],
710         },
711       ],  # targets
712     }, { # else: OS != "mac"
713       'targets': [
714         {
715           'target_name': 'convert_dict',
716           'type': 'executable',
717           'variables': { 'enable_wexit_time_destructors': 1, },
718           'dependencies': [
719             '../base/base.gyp:base',
720             '../base/base.gyp:base_i18n',
721             'convert_dict_lib',
722             '../third_party/hunspell/hunspell.gyp:hunspell',
723           ],
724           'sources': [
725             'tools/convert_dict/convert_dict.cc',
726           ],
727         },
728         {
729           'target_name': 'convert_dict_lib',
730           'product_name': 'convert_dict',
731           'type': 'static_library',
732           'variables': { 'enable_wexit_time_destructors': 1, },
733           'include_dirs': [
734             '..',
735           ],
736           'dependencies': [
737             '../base/base.gyp:base',
738           ],
739           'sources': [
740             'tools/convert_dict/aff_reader.cc',
741             'tools/convert_dict/aff_reader.h',
742             'tools/convert_dict/dic_reader.cc',
743             'tools/convert_dict/dic_reader.h',
744             'tools/convert_dict/hunspell_reader.cc',
745             'tools/convert_dict/hunspell_reader.h',
746           ],
747         },
748         {
749           'target_name': 'flush_cache',
750           'type': 'executable',
751           'dependencies': [
752             '../base/base.gyp:base',
753             '../base/base.gyp:test_support_base',
754           ],
755           'sources': [
756             'tools/perf/flush_cache/flush_cache.cc',
757           ],
758         },
759       ],
760     }],  # OS!="mac"
761     ['OS=="linux"',
762       { 'targets': [
763         {
764           'target_name': 'linux_symbols',
765           'type': 'none',
766           'conditions': [
767             ['linux_dump_symbols==1', {
768               'actions': [
769                 {
770                   'action_name': 'dump_symbols',
771                   'inputs': [
772                     '<(DEPTH)/build/linux/dump_app_syms',
773                     '<(PRODUCT_DIR)/dump_syms',
774                     '<(PRODUCT_DIR)/chrome',
775                   ],
776                   'outputs': [
777                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
778                   ],
779                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
780                              '<(PRODUCT_DIR)/dump_syms',
781                              '<(linux_strip_binary)',
782                              '<(PRODUCT_DIR)/chrome',
783                              '<@(_outputs)'],
784                   'message': 'Dumping breakpad symbols to <(_outputs)',
785                   'process_outputs_as_sources': 1,
786                 },
787               ],
788               'dependencies': [
789                 'chrome',
790                 '../breakpad/breakpad.gyp:dump_syms',
791               ],
792             }],
793             ['linux_strip_reliability_tests==1', {
794               'actions': [
795                 {
796                   'action_name': 'strip_reliability_tests',
797                   'inputs': [
798                     '<(PRODUCT_DIR)/automated_ui_tests',
799                     '<(PRODUCT_DIR)/reliability_tests',
800                     '<(PRODUCT_DIR)/_pyautolib.so',
801                   ],
802                   'outputs': [
803                     '<(PRODUCT_DIR)/strip_reliability_tests.stamp',
804                   ],
805                   'action': ['strip',
806                              '-g',
807                              '<@(_inputs)'],
808                   'message': 'Stripping reliability tests',
809                 },
810               ],
811               'dependencies': [
812                 'automated_ui_tests',
813                 'reliability_tests',
814               ],
815             }],
816           ],
817         },
818         {
819           'target_name': 'ipcfuzz',
820           'type': 'loadable_module',
821           'include_dirs': [
822             '..',
823           ],
824           'dependencies': [
825             'test_support_common',
826             '../skia/skia.gyp:skia',
827           ],
828           'sources': [
829             'tools/ipclist/ipcfuzz.cc',
830           ],
831         },
832       ],
833     },],  # OS=="linux"
834     ['OS=="win"',
835       { 'targets': [
836         {
837           # For historical reasons, chrome/chrome.sln has been the entry point
838           # for new Chrome developers. To assist development, include several
839           # core unittests that are otherwise only accessible side-by-side with
840           # chrome via all/all.sln.
841           'target_name': 'test_targets',
842           'type': 'none',
843           'dependencies': [
844             '../base/base.gyp:base_unittests',
845             '../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
846             '../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
847             '../content/content.gyp:content_browsertests',
848             '../content/content.gyp:content_shell',
849             '../content/content.gyp:content_unittests',
850             '../net/net.gyp:net_unittests',
851             '../ui/ui.gyp:ui_unittests',
852           ],
853           'conditions': [
854             ['use_aura==1', {
855               'dependencies!': [
856                 '../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
857                 '../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
858               ],
859             }],
860           ],
861         },
862         {
863           'target_name': 'chrome_version_resources',
864           'type': 'none',
865           'direct_dependent_settings': {
866             'include_dirs': [
867               '<(SHARED_INTERMEDIATE_DIR)/chrome_version',
868             ],
869           },
870           'sources': [
871             'app/app_host_exe.ver',
872             'app/chrome_exe.ver',
873             'app/chrome_dll.ver',
874             'app/nacl64_exe.ver',
875             'app/other.ver',
876           ],
877           'rules': [
878             {
879               'rule_name': 'version',
880               'extension': 'ver',
881               'variables': {
882                 'lastchange_path':
883                   '<(DEPTH)/build/util/LASTCHANGE',
884                 'template_input_path': 'app/chrome_version.rc.version',
885               },
886               'conditions': [
887                 ['branding == "Chrome"', {
888                   'variables': {
889                      'branding_path': 'app/theme/google_chrome/BRANDING',
890                   },
891                 }, { # else branding!="Chrome"
892                   'variables': {
893                      'branding_path': 'app/theme/chromium/BRANDING',
894                   },
895                 }],
896               ],
897               'inputs': [
898                 '<(template_input_path)',
899                 '<(version_path)',
900                 '<(branding_path)',
901                 '<(lastchange_path)',
902               ],
903               'outputs': [
904                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/<(RULE_INPUT_ROOT)_version.rc',
905               ],
906               'action': [
907                 'python',
908                 '<(version_py_path)',
909                 '-f', '<(RULE_INPUT_PATH)',
910                 '-f', '<(version_path)',
911                 '-f', '<(branding_path)',
912                 '-f', '<(lastchange_path)',
913                 '<(template_input_path)',
914                 '<@(_outputs)',
915               ],
916               'message': 'Generating version information in <(_outputs)'
917             },
918           ],
919         },
920         {
921           'target_name': 'chrome_version_header',
922           'type': 'none',
923           'hard_dependency': 1,
924           'actions': [
925             {
926               'action_name': 'version_header',
927               'variables': {
928                 'lastchange_path':
929                   '<(DEPTH)/build/util/LASTCHANGE',
930               },
931               'conditions': [
932                 ['branding == "Chrome"', {
933                   'variables': {
934                      'branding_path': 'app/theme/google_chrome/BRANDING',
935                   },
936                 }, { # else branding!="Chrome"
937                   'variables': {
938                      'branding_path': 'app/theme/chromium/BRANDING',
939                   },
940                 }],
941               ],
942               'inputs': [
943                 '<(version_path)',
944                 '<(branding_path)',
945                 '<(lastchange_path)',
946                 'version.h.in',
947               ],
948               'outputs': [
949                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
950               ],
951               'action': [
952                 'python',
953                 '<(version_py_path)',
954                 '-f', '<(version_path)',
955                 '-f', '<(branding_path)',
956                 '-f', '<(lastchange_path)',
957                 'version.h.in',
958                 '<@(_outputs)',
959               ],
960               'message': 'Generating version header file: <@(_outputs)',
961             },
962           ],
963         },
964         {
965           'target_name': 'automation',
966           'type': 'static_library',
967           'dependencies': [
968             'chrome_resources.gyp:theme_resources',
969             '../skia/skia.gyp:skia',
970           ],
971           'include_dirs': [
972             '..',
973           ],
974           'sources': [
975              'test/automation/automation_handle_tracker.cc',
976              'test/automation/automation_handle_tracker.h',
977              'test/automation/automation_json_requests.cc',
978              'test/automation/automation_json_requests.h',
979              'test/automation/automation_proxy.cc',
980              'test/automation/automation_proxy.h',
981              'test/automation/browser_proxy.cc',
982              'test/automation/browser_proxy.h',
983              'test/automation/tab_proxy.cc',
984              'test/automation/tab_proxy.h',
985              'test/automation/value_conversion_traits.cc',
986              'test/automation/value_conversion_traits.h',
987              'test/automation/value_conversion_util.h',
988              'test/automation/window_proxy.cc',
989              'test/automation/window_proxy.h',
990           ],
991         },
992         {
993           'target_name': 'crash_service',
994           'type': 'executable',
995           'dependencies': [
996             'app/policy/cloud_policy_codegen.gyp:policy',
997             'installer_util',
998             '../base/base.gyp:base',
999             '../breakpad/breakpad.gyp:breakpad_handler',
1000             '../breakpad/breakpad.gyp:breakpad_sender',
1001             '../chrome/common_constants.gyp:common_constants',
1002           ],
1003           'include_dirs': [
1004             '..',
1005           ],
1006           'sources': [
1007             'tools/crash_service/crash_service.cc',
1008             'tools/crash_service/crash_service.h',
1009             'tools/crash_service/main.cc',
1010           ],
1011           'msvs_settings': {
1012             'VCLinkerTool': {
1013               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1014             },
1015           },
1016         },
1017         {
1018           'target_name': 'crash_service_win64',
1019           'type': 'executable',
1020           'product_name': 'crash_service64',
1021           'dependencies': [
1022             'installer_util_nacl_win64',
1023             '../base/base.gyp:base_static_win64',
1024             '../breakpad/breakpad.gyp:breakpad_handler_win64',
1025             '../breakpad/breakpad.gyp:breakpad_sender_win64',
1026             '../chrome/common_constants.gyp:common_constants_win64',
1027           ],
1028           'include_dirs': [
1029             '..',
1030           ],
1031           'sources': [
1032             'tools/crash_service/crash_service.cc',
1033             'tools/crash_service/crash_service.h',
1034             'tools/crash_service/main.cc',
1035             '../content/public/common/content_switches.cc',
1036           ],
1037           'defines': [
1038             'COMPILE_CONTENT_STATICALLY',
1039           ],
1040           'msvs_settings': {
1041             'VCLinkerTool': {
1042               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1043             },
1044           },
1045           'configurations': {
1046             'Common_Base': {
1047               'msvs_target_platform': 'x64',
1048             },
1049           },
1050         },
1051         {
1052           'target_name': 'sb_sigutil',
1053           'type': 'executable',
1054           'dependencies': [
1055             '../base/base.gyp:base',
1056             'safe_browsing_proto',
1057           ],
1058           'sources': [
1059             'browser/safe_browsing/signature_util.h',
1060             'browser/safe_browsing/signature_util_win.cc',
1061             'tools/safe_browsing/sb_sigutil.cc',
1062           ],
1063         },
1064       ]},  # 'targets'
1065     ],  # OS=="win"
1066     ['chromeos==1', {
1067       'includes': [ 'chrome_browser_chromeos.gypi' ],
1068     }],  # chromeos==1
1069     ['OS=="android"',
1070       {
1071       'targets': [
1072         {
1073           'target_name': 'chrome_java',
1074           'type': 'none',
1075           'dependencies': [
1076             '../base/base.gyp:base',
1077             '../chrome/browser/component/components.gyp:web_contents_delegate_android_java',
1078             '../content/content.gyp:content_java',
1079             '../ui/ui.gyp:ui_java',
1080           ],
1081           'variables': {
1082             'package_name': 'chrome',
1083             'java_in_dir': '../chrome/android/java',
1084           },
1085           'includes': [
1086             '../build/java.gypi',
1087           ],
1088         },
1089       ], # 'targets'
1090       'includes': [
1091         'chrome_android.gypi',
1092       ]}, # 'includes'
1093     ],  # OS=="android"
1094   ],  # 'conditions'