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