Disable input view by default.
[chromium-blink-merge.git] / chrome / chrome.gyp
blobc73bc7d246a16b4bae63c1604491d1cc1fa76123
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       '../sync/sync.gyp:sync',
17     ],
18     'chromium_child_dependencies': [
19       'common',
20       '../sync/sync.gyp:sync',
21     ],
22     'allocator_target': '../base/allocator/allocator.gyp:allocator',
23     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
24     'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
25     'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'],
26     'conditions': [
27       ['OS!="ios"', {
28         'chromium_browser_dependencies': [
29           '../ppapi/ppapi_internal.gyp:ppapi_host',
30         ],
31         'chromium_child_dependencies': [
32           'debugger',
33           'plugin',
34           'renderer',
35           'utility',
36           '../content/content.gyp:content_gpu',
37           '../content/content.gyp:content_ppapi_plugin',
38           '../content/content.gyp:content_worker',
39           '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
40         ],
41       }],
42       ['enable_printing!=0', {
43         'chromium_browser_dependencies': [
44           '../printing/printing.gyp:printing',
45         ],
46       }],
47       ['OS=="win"', {
48         'platform_locale_settings_grd':
49             'app/resources/locale_settings_win.grd',
50       },],
51       ['enable_printing==1', {
52         'chromium_browser_dependencies': [
53           'service',
54         ],
55       }],
56       ['OS=="linux"', {
57         'conditions': [
58           ['chromeos==1', {
59             'conditions': [
60               ['branding=="Chrome"', {
61                 'platform_locale_settings_grd':
62                     'app/resources/locale_settings_google_chromeos.grd',
63               }, {  # branding!=Chrome
64                 'platform_locale_settings_grd':
65                     'app/resources/locale_settings_chromiumos.grd',
66               }],
67             ]
68           }, {  # chromeos==0
69             'platform_locale_settings_grd':
70                 'app/resources/locale_settings_linux.grd',
71           }],
72         ],
73       },],
74       ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
75         'platform_locale_settings_grd':
76             'app/resources/locale_settings_linux.grd',
77       },],
78       ['OS=="mac"', {
79         'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
80         'platform_locale_settings_grd':
81             'app/resources/locale_settings_mac.grd',
82       }],  # OS=="mac"
83     ],  # conditions
84   },  # variables
85   'includes': [
86     # Place some targets in gypi files to reduce contention on this file.
87     # By using an include, we keep everything in a single xcodeproj file.
88     # Note on Win64 targets: targets that end with win64 be used
89     # on 64-bit Windows only. Targets that end with nacl_win64 should be used
90     # by Native Client only.
91     # NOTE: Most new includes should go in the OS!="ios" condition below.
92     '../build/chrome_settings.gypi',
93     '../build/util/version.gypi',
94     '../build/win_precompile.gypi',
95     'chrome_browser.gypi',
96     'chrome_browser_ui.gypi',
97     'chrome_common.gypi',
98     'chrome_installer_util.gypi',
99     '../components/nacl/nacl_defines.gypi',
100   ],
101   'conditions': [
102     ['OS!="ios"', {
103       'includes': [
104         'chrome_browser_extensions.gypi',
105         'chrome_dll.gypi',
106         'chrome_exe.gypi',
107         'chrome_installer.gypi',
108         'chrome_renderer.gypi',
109         'chrome_tests.gypi',
110         'chrome_tests_unit.gypi',
111         'policy_templates.gypi',
112         '../apps/apps.gypi',
113       ],
114       'targets': [
115         {
116           'target_name': 'default_extensions',
117           'type': 'none',
118           'conditions': [
119             ['OS=="win"', {
120               'copies': [
121                 {
122                   'destination': '<(PRODUCT_DIR)/extensions',
123                   'files': [
124                     'browser/extensions/default_extensions/external_extensions.json'
125                   ]
126                 }
127               ],
128             }]
129           ],
130         },
131         {
132           'target_name': 'debugger',
133           'type': 'static_library',
134           'variables': { 'enable_wexit_time_destructors': 1, },
135           'dependencies': [
136             'chrome_resources.gyp:chrome_extra_resources',
137             'chrome_resources.gyp:chrome_resources',
138             'chrome_resources.gyp:chrome_strings',
139             'chrome_resources.gyp:theme_resources',
140             'common/extensions/api/api.gyp:chrome_api',
141             '../base/base.gyp:base',
142             '../content/content.gyp:content_browser',
143             '../net/net.gyp:http_server',
144             '../net/net.gyp:net',
145             '../skia/skia.gyp:skia',
146             '../third_party/icu/icu.gyp:icui18n',
147             '../third_party/icu/icu.gyp:icuuc',
148             '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
149             '../third_party/libusb/libusb.gyp:libusb',
150           ],
151           'include_dirs': [
152             '..',
153           ],
154           'sources': [
155             'browser/devtools/adb/android_rsa.cc',
156             'browser/devtools/adb/android_rsa.h',
157             'browser/devtools/adb/android_usb_device.cc',
158             'browser/devtools/adb/android_usb_device.h',
159             'browser/devtools/adb/android_usb_socket.cc',
160             'browser/devtools/adb/android_usb_socket.h',
161             'browser/devtools/adb_client_socket.cc',
162             'browser/devtools/adb_client_socket.h',
163             'browser/devtools/adb_web_socket.cc',
164             'browser/devtools/adb_web_socket.h',
165             'browser/devtools/android_device.cc',
166             'browser/devtools/android_device.h',
167             'browser/devtools/browser_list_tabcontents_provider.cc',
168             'browser/devtools/browser_list_tabcontents_provider.h',
169             'browser/devtools/devtools_adb_bridge.cc',
170             'browser/devtools/devtools_adb_bridge.h',
171             'browser/devtools/devtools_contents_resizing_strategy.cc',
172             'browser/devtools/devtools_contents_resizing_strategy.h',
173             'browser/devtools/devtools_embedder_message_dispatcher.cc',
174             'browser/devtools/devtools_embedder_message_dispatcher.h',
175             'browser/devtools/devtools_file_helper.cc',
176             'browser/devtools/devtools_file_helper.h',
177             'browser/devtools/devtools_file_system_indexer.cc',
178             'browser/devtools/devtools_file_system_indexer.h',
179             'browser/devtools/devtools_protocol.cc',
180             'browser/devtools/devtools_protocol.h',
181             'browser/devtools/devtools_target_impl.cc',
182             'browser/devtools/devtools_target_impl.h',
183             'browser/devtools/devtools_targets_ui.cc',
184             'browser/devtools/devtools_targets_ui.h',
185             'browser/devtools/devtools_toggle_action.cc',
186             'browser/devtools/devtools_toggle_action.h',
187             'browser/devtools/devtools_window.cc',
188             'browser/devtools/devtools_window.h',
189             'browser/devtools/port_forwarding_controller.cc',
190             'browser/devtools/port_forwarding_controller.h',
191             'browser/devtools/refcounted_adb_thread.cc',
192             'browser/devtools/refcounted_adb_thread.h',
193             'browser/devtools/remote_debugging_server.cc',
194             'browser/devtools/remote_debugging_server.h',
195           ],
196           'conditions': [
197             ['toolkit_uses_gtk == 1', {
198               'dependencies': [
199                 '../build/linux/system.gyp:gtk',
200               ],
201             }],
202             ['OS=="android"', {
203               'dependencies!': [
204                 '../third_party/libusb/libusb.gyp:libusb',
205               ],
206               'sources!': [
207                 'browser/devtools/adb/android_rsa.cc',
208                 'browser/devtools/browser_list_tabcontents_provider.cc',
209                 'browser/devtools/devtools_file_system_indexer.cc',
210                 'browser/devtools/devtools_target_impl.cc',
211                 'browser/devtools/devtools_window.cc',
212                 'browser/devtools/remote_debugging_server.cc',
213               ],
214             }],
215             ['debug_devtools==1', {
216               'defines': [
217                 'DEBUG_DEVTOOLS=1',
218                ],
219             }],
220           ],
221           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
222           'msvs_disabled_warnings': [ 4267, ],
223         },
224         {
225           'target_name': 'plugin',
226           'type': 'static_library',
227           'variables': { 'enable_wexit_time_destructors': 1, },
228           'dependencies': [
229             'chrome_resources.gyp:chrome_strings',
230             '../base/base.gyp:base',
231             '../content/content.gyp:content_plugin',
232           ],
233           'sources': [
234             'plugin/chrome_content_plugin_client.cc',
235             'plugin/chrome_content_plugin_client.h',
236           ],
237           'include_dirs': [
238             '..',
239             '<(grit_out_dir)',
240           ],
241         },
242         {
243           'target_name': 'utility',
244           'type': 'static_library',
245           'variables': { 'enable_wexit_time_destructors': 1, },
246           'dependencies': [
247             'common/extensions/api/api.gyp:chrome_api',
248             '../base/base.gyp:base',
249             '../components/components.gyp:wifi_component',
250             '../content/content.gyp:content_common',
251             '../content/content.gyp:content_utility',
252             '../media/media.gyp:media',
253             '../skia/skia.gyp:skia',
254             '../third_party/libxml/libxml.gyp:libxml',
255             'common',
256             '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
257             '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
258           ],
259           'sources': [
260             'utility/chrome_content_utility_client.cc',
261             'utility/chrome_content_utility_client.h',
262             'utility/chrome_content_utility_ipc_whitelist.cc',
263             'utility/chrome_content_utility_ipc_whitelist.h',
264             'utility/cloud_print/bitmap_image.cc',
265             'utility/cloud_print/bitmap_image.h',
266             'utility/cloud_print/pwg_encoder.cc',
267             'utility/cloud_print/pwg_encoder.h',
268             'utility/extensions/unpacker.cc',
269             'utility/extensions/unpacker.h',
270             'utility/image_writer/error_messages.cc',
271             'utility/image_writer/error_messages.h',
272             'utility/image_writer/image_writer.cc',
273             'utility/image_writer/image_writer.h',
274             'utility/image_writer/image_writer_handler.cc',
275             'utility/image_writer/image_writer_handler.h',
276             'utility/importer/bookmark_html_reader.cc',
277             'utility/importer/bookmark_html_reader.h',
278             'utility/importer/bookmarks_file_importer.cc',
279             'utility/importer/bookmarks_file_importer.h',
280             'utility/importer/external_process_importer_bridge.cc',
281             'utility/importer/external_process_importer_bridge.h',
282             'utility/importer/favicon_reencode.cc',
283             'utility/importer/favicon_reencode.h',
284             'utility/importer/firefox_importer.cc',
285             'utility/importer/firefox_importer.h',
286             'utility/importer/ie_importer_win.cc',
287             'utility/importer/ie_importer_win.h',
288             'utility/importer/importer.cc',
289             'utility/importer/importer.h',
290             'utility/importer/importer_creator.cc',
291             'utility/importer/importer_creator.h',
292             'utility/importer/nss_decryptor.cc',
293             'utility/importer/nss_decryptor.h',
294             'utility/importer/nss_decryptor_mac.h',
295             'utility/importer/nss_decryptor_mac.mm',
296             'utility/importer/nss_decryptor_win.cc',
297             'utility/importer/nss_decryptor_win.h',
298             'utility/importer/safari_importer.h',
299             'utility/importer/safari_importer.mm',
300             'utility/media_galleries/ipc_data_source.cc',
301             'utility/media_galleries/ipc_data_source.h',
302             'utility/media_galleries/itunes_pref_parser_win.cc',
303             'utility/media_galleries/itunes_pref_parser_win.h',
304             'utility/media_galleries/media_metadata_parser.cc',
305             'utility/media_galleries/media_metadata_parser.h',
306             'utility/profile_import_handler.cc',
307             'utility/profile_import_handler.h',
308             'utility/utility_message_handler.h',
309             'utility/web_resource_unpacker.cc',
310             'utility/web_resource_unpacker.h',
311           ],
312           'include_dirs': [
313             '..',
314             '<(grit_out_dir)',
315           ],
316           'conditions': [
317             ['toolkit_uses_gtk == 1', {
318               'dependencies': [
319                 '../build/linux/system.gyp:gtk',
320               ],
321             }],
322             ['OS=="win" or OS=="mac"', {
323               'sources': [
324                 'utility/media_galleries/iapps_xml_utils.cc',
325                 'utility/media_galleries/iapps_xml_utils.h',
326                 'utility/media_galleries/itunes_library_parser.cc',
327                 'utility/media_galleries/itunes_library_parser.h',
328                 'utility/media_galleries/picasa_album_table_reader.cc',
329                 'utility/media_galleries/picasa_album_table_reader.h',
330                 'utility/media_galleries/picasa_albums_indexer.cc',
331                 'utility/media_galleries/picasa_albums_indexer.h',
332                 'utility/media_galleries/pmp_column_reader.cc',
333                 'utility/media_galleries/pmp_column_reader.h',
334               ],
335             }],
336             ['OS=="mac"', {
337               'sources': [
338                 'utility/media_galleries/iphoto_library_parser.cc',
339                 'utility/media_galleries/iphoto_library_parser.h',
340               ],
341             }],
342             ['use_openssl==1', {
343               'sources!': [
344                 'utility/importer/nss_decryptor.cc',
345               ]
346             }],
347             ['OS!="win" and OS!="mac" and use_openssl==0', {
348               'dependencies': [
349                 '../crypto/crypto.gyp:crypto',
350               ],
351               'sources': [
352                 'utility/importer/nss_decryptor_system_nss.cc',
353                 'utility/importer/nss_decryptor_system_nss.h',
354               ],
355             }],
356             ['OS=="android"', {
357               'sources/': [
358                 ['exclude', '^utility/importer/'],
359                 ['exclude', '^utility/media_galleries/'],
360                 ['exclude', '^utility/profile_import_handler\.cc'],
361               ],
362             }],
363             ['enable_mdns == 1', {
364               'sources': [
365                 'utility/local_discovery/service_discovery_client_impl.cc',
366                 'utility/local_discovery/service_discovery_client_impl.h',
367                 'utility/local_discovery/service_discovery_message_handler.cc',
368                 'utility/local_discovery/service_discovery_message_handler.h',
369               ]
370             }],
371           ],
372           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
373           'msvs_disabled_warnings': [ 4267, ],
374         },
375       ],
376     }],  # OS!="ios"
377     ['OS=="mac"', {
378       'includes': [
379         '../apps/app_shim/app_shim.gypi',
380       ],
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             'common_constants.gyp:common_constants',
513           ],
514           'sources': [
515             'common/mac/app_mode_chrome_locator.h',
516             'common/mac/app_mode_chrome_locator.mm',
517             'common/mac/app_mode_common.h',
518             'common/mac/app_mode_common.mm',
519           ],
520           'include_dirs': [
521             '..',
522           ],
523         },  # target app_mode_app_support
524         {
525           # This produces the template for app mode loader bundles. It's a
526           # template in the sense that parts of it need to be "filled in" by
527           # Chrome before it can be executed.
528           'target_name': 'app_mode_app',
529           'type': 'executable',
530           'mac_bundle' : 1,
531           'variables': { 'enable_wexit_time_destructors': 1, },
532           'product_name': 'app_mode_loader',
533           'dependencies': [
534             'app_mode_app_support',
535             'infoplist_strings_tool',
536           ],
537           'sources': [
538             'app/app_mode_loader_mac.mm',
539             'app/app_mode-Info.plist',
540           ],
541           'include_dirs': [
542             '..',
543           ],
544           'link_settings': {
545             'libraries': [
546               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
547               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
548             ],
549           },
550           'mac_bundle_resources!': [
551             'app/app_mode-Info.plist',
552           ],
553           'mac_bundle_resources/': [
554             ['exclude', '.*'],
555           ],
556           'xcode_settings': {
557             'INFOPLIST_FILE': 'app/app_mode-Info.plist',
558             'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
559           },
560           'postbuilds' : [
561             {
562               # Modify the Info.plist as needed.  The script explains why this
563               # is needed.  This is also done in the chrome and chrome_dll
564               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
565               # are used because Breakpad, Keystone, and SCM keys are
566               # never placed into the app mode loader.
567               'postbuild_name': 'Tweak Info.plist',
568               'action': ['<(tweak_info_plist_path)',
569                          '--breakpad=0',
570                          '--keystone=0',
571                          '--scm=0'],
572             },
573           ],
574         },  # target app_mode_app
575         {
576           # Convenience target to build a disk image.
577           'target_name': 'build_app_dmg',
578           # Don't place this in the 'all' list; most won't want it.
579           # In GYP, booleans are 0/1, not True/False.
580           'suppress_wildcard': 1,
581           'type': 'none',
582           'dependencies': [
583             'chrome',
584           ],
585           'variables': {
586             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
587             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
589             'conditions': [
590               # This duplicates the output path from build_app_dmg.
591               ['branding=="Chrome"', {
592                 'dmg_name': 'GoogleChrome.dmg',
593               }, { # else: branding!="Chrome"
594                 'dmg_name': 'Chromium.dmg',
595               }],
596             ],
597           },
598           'actions': [
599             {
600               'inputs': [
601                 '<(build_app_dmg_script_path)',
602                 '<(pkg_dmg_script_path)',
603                 '<(PRODUCT_DIR)/<(mac_product_name).app',
604               ],
605               'outputs': [
606                 '<(PRODUCT_DIR)/<(dmg_name)',
607               ],
608               'action_name': 'build_app_dmg',
609               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
610             },
611           ],  # 'actions'
612         },
613         {
614           # Dummy target to allow chrome to require plugin_carbon_interpose to
615           # build without actually linking to the resulting library.
616           'target_name': 'interpose_dependency_shim',
617           'type': 'executable',
618           'variables': { 'enable_wexit_time_destructors': 1, },
619           'dependencies': [
620             'plugin_carbon_interpose',
621           ],
622           # In release, we end up with a strip step that is unhappy if there is
623           # no binary. Rather than check in a new file for this temporary hack,
624           # just generate a source file on the fly.
625           'actions': [
626             {
627               'action_name': 'generate_stub_main',
628               'process_outputs_as_sources': 1,
629               'inputs': [],
630               'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ],
631               'action': [
632                 'bash', '-c',
633                 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c'
634               ],
635             },
636           ],
637         },
638         {
639           # dylib for interposing Carbon calls in the plugin process.
640           'target_name': 'plugin_carbon_interpose',
641           'type': 'shared_library',
642           'variables': { 'enable_wexit_time_destructors': 1, },
643           # This target must not depend on static libraries, else the code in
644           # those libraries would appear twice in plugin processes: Once from
645           # Chromium Framework, and once from this dylib.
646           'dependencies': [
647             'chrome_dll',
648           ],
649           'conditions': [
650             ['component=="shared_library"', {
651               'dependencies': [
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/base/ui_base.gyp:ui_base',
703             '../ui/gfx/gfx.gyp:gfx',
704             '../ui/gfx/gfx.gyp:gfx_geometry',
705           ],
706           'include_dirs': [
707             '<(grit_out_dir)',
708           ],
709           'sources': [
710             'tools/mac_helpers/infoplist_strings_util.mm',
711           ],
712         },
713       ],  # targets
714     }],  # OS=="mac"
715     ['OS=="linux"',
716       { 'targets': [
717         {
718           'target_name': 'linux_symbols',
719           'type': 'none',
720           'conditions': [
721             ['linux_dump_symbols==1', {
722               'actions': [
723                 {
724                   'action_name': 'dump_symbols',
725                   'inputs': [
726                     '<(DEPTH)/build/linux/dump_app_syms',
727                     '<(PRODUCT_DIR)/dump_syms',
728                     '<(PRODUCT_DIR)/chrome',
729                   ],
730                   'outputs': [
731                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
732                   ],
733                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
734                              '<(PRODUCT_DIR)/dump_syms',
735                              '<(linux_strip_binary)',
736                              '<(PRODUCT_DIR)/chrome',
737                              '<@(_outputs)'],
738                   'message': 'Dumping breakpad symbols to <(_outputs)',
739                   'process_outputs_as_sources': 1,
740                 },
741               ],
742               'dependencies': [
743                 'chrome',
744                 '../breakpad/breakpad.gyp:dump_syms',
745               ],
746             }],
747             ['linux_strip_reliability_tests==1', {
748               'actions': [
749                 {
750                   'action_name': 'strip_reliability_tests',
751                   'inputs': [
752                     '<(PRODUCT_DIR)/_pyautolib.so',
753                   ],
754                   'outputs': [
755                     '<(PRODUCT_DIR)/strip_reliability_tests.stamp',
756                   ],
757                   'action': ['strip',
758                              '-g',
759                              '<@(_inputs)'],
760                   'message': 'Stripping reliability tests',
761                 },
762               ],
763             }],
764           ],
765         },
766       ],
767     }],  # OS=="linux"
768     ['OS=="win"',
769       { 'targets': [
770         {
771           # For historical reasons, chrome/chrome.sln has been the entry point
772           # for new Chrome developers. To assist development, include several
773           # core unittests that are otherwise only accessible side-by-side with
774           # chrome via all/all.sln.
775           'target_name': 'test_targets',
776           'type': 'none',
777           'dependencies': [
778             '../base/base.gyp:base_unittests',
779             '../content/content_shell_and_tests.gyp:content_browsertests',
780             '../content/content_shell_and_tests.gyp:content_shell',
781             '../content/content_shell_and_tests.gyp:content_unittests',
782             '../net/net.gyp:net_unittests',
783             '../ui/ui_unittests.gyp:ui_unittests',
784           ],
785         },
786         {
787           'target_name': 'chrome_version_resources',
788           'type': 'none',
789           'conditions': [
790             ['branding == "Chrome"', {
791               'variables': {
792                  'branding_path': 'app/theme/google_chrome/BRANDING',
793               },
794             }, { # else branding!="Chrome"
795               'variables': {
796                  'branding_path': 'app/theme/chromium/BRANDING',
797               },
798             }],
799           ],
800           'variables': {
801             'output_dir': 'chrome_version',
802             'template_input_path': 'app/chrome_version.rc.version',
803           },
804           'direct_dependent_settings': {
805             'include_dirs': [
806               '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
807             ],
808           },
809           'sources': [
810             'app/chrome_exe.ver',
811             'app/chrome_dll.ver',
812             'app/nacl64_exe.ver',
813             'app/other.ver',
814           ],
815           'includes': [
816             'version_resource_rules.gypi',
817           ],
818         },
819         {
820           'target_name': 'chrome_version_header',
821           'type': 'none',
822           'hard_dependency': 1,
823           'actions': [
824             {
825               'action_name': 'version_header',
826               'variables': {
827                 'lastchange_path':
828                   '<(DEPTH)/build/util/LASTCHANGE',
829               },
830               'conditions': [
831                 ['branding == "Chrome"', {
832                   'variables': {
833                      'branding_path': 'app/theme/google_chrome/BRANDING',
834                   },
835                 }, { # else branding!="Chrome"
836                   'variables': {
837                      'branding_path': 'app/theme/chromium/BRANDING',
838                   },
839                 }],
840               ],
841               'inputs': [
842                 '<(version_path)',
843                 '<(branding_path)',
844                 '<(lastchange_path)',
845                 'version.h.in',
846               ],
847               'outputs': [
848                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
849               ],
850               'action': [
851                 'python',
852                 '<(version_py_path)',
853                 '-f', '<(version_path)',
854                 '-f', '<(branding_path)',
855                 '-f', '<(lastchange_path)',
856                 'version.h.in',
857                 '<@(_outputs)',
858               ],
859               'message': 'Generating version header file: <@(_outputs)',
860             },
861           ],
862         },
863         {
864           'target_name': 'automation',
865           'type': 'static_library',
866           'dependencies': [
867             'chrome_resources.gyp:theme_resources',
868             '../ui/accessibility/accessibility.gyp:ax_gen',
869             '../skia/skia.gyp:skia',
870           ],
871           'include_dirs': [
872             '..',
873           ],
874           'sources': [
875              'test/automation/automation_handle_tracker.cc',
876              'test/automation/automation_handle_tracker.h',
877              'test/automation/automation_proxy.cc',
878              'test/automation/automation_proxy.h',
879              'test/automation/browser_proxy.cc',
880              'test/automation/browser_proxy.h',
881              'test/automation/tab_proxy.cc',
882              'test/automation/tab_proxy.h',
883              'test/automation/window_proxy.cc',
884              'test/automation/window_proxy.h',
885           ],
886         },
887         {
888           'target_name': 'crash_service',
889           'type': 'executable',
890           'dependencies': [
891             'installer_util',
892             '../base/base.gyp:base',
893             '../chrome/common_constants.gyp:common_constants',
894             '../components/components.gyp:breakpad_crash_service',
895           ],
896           'include_dirs': [
897             '..',
898           ],
899           'sources': [
900             'tools/crash_service/main.cc',
901           ],
902           'msvs_settings': {
903             'VCLinkerTool': {
904               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
905             },
906           },
907         },
908         {
909           'target_name': 'sb_sigutil',
910           'type': 'executable',
911           'dependencies': [
912             '../base/base.gyp:base',
913             'safe_browsing_proto',
914           ],
915           'sources': [
916             'browser/safe_browsing/binary_feature_extractor.h',
917             'browser/safe_browsing/binary_feature_extractor_win.cc',
918             'browser/safe_browsing/pe_image_reader_win.cc',
919             'browser/safe_browsing/pe_image_reader_win.h',
920             'tools/safe_browsing/sb_sigutil.cc',
921           ],
922         },
923       ],  # 'targets'
924       'includes': [
925         'chrome_process_finder.gypi',
926         'metro_utils.gypi',
927       ],
928     }],  # OS=="win"
929     ['OS=="win" and target_arch=="ia32"',
930       { 'targets': [
931         {
932           'target_name': 'chrome_user32_delay_imports',
933           'type': 'none',
934           'variables': {
935             'lib_dir': '<(INTERMEDIATE_DIR)',
936           },
937           'sources': [
938               'chrome.user32.delay.imports'
939           ],
940           'includes': [
941               '../build/win/importlibs/create_import_lib.gypi',
942           ],
943           'direct_dependent_settings': {
944             'msvs_settings': {
945               'VCLinkerTool': {
946                 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
947                 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
948               },
949             },
950           },
951         },
952         {
953           'target_name': 'crash_service_win64',
954           'type': 'executable',
955           'product_name': 'crash_service64',
956           'dependencies': [
957             'installer_util_nacl_win64',
958             '../base/base.gyp:base_static_win64',
959             '../chrome/common_constants.gyp:common_constants_win64',
960             '../components/components.gyp:breakpad_crash_service_win64',
961           ],
962           'include_dirs': [
963             '..',
964           ],
965           'sources': [
966             'tools/crash_service/main.cc',
967             '../content/public/common/content_switches.cc',
968           ],
969           'defines': [
970             'COMPILE_CONTENT_STATICALLY',
971           ],
972           'msvs_settings': {
973             'VCLinkerTool': {
974               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
975             },
976           },
977           'configurations': {
978             'Common_Base': {
979               'msvs_target_platform': 'x64',
980             },
981           },
982         },
983       ]},  # 'targets'
984     ],  # OS=="win" and target_arch=="ia32"
985     ['chromeos==1', {
986       'includes': [ 'chrome_browser_chromeos.gypi' ],
987     }],  # chromeos==1
988     ['OS=="android"',
989       {
990       'targets': [
991         {
992           'target_name': 'chrome_java',
993           'type': 'none',
994           'dependencies': [
995             'activity_type_ids_java',
996             'app_banner_metrics_ids_java',
997             'chrome_resources.gyp:chrome_strings',
998             'profile_sync_service_model_type_selection_java',
999             'resource_id_java',
1000             'toolbar_model_security_levels_java',
1001             'tab_load_status_java',
1002             '../base/base.gyp:base',
1003             '../components/components.gyp:autofill_java',
1004             '../components/components.gyp:dom_distiller_core_java',
1005             '../components/components.gyp:navigation_interception_java',
1006             '../components/components.gyp:sessions',
1007             '../components/components.gyp:web_contents_delegate_android_java',
1008             '../content/content.gyp:content_java',
1009             '../printing/printing.gyp:printing_java',
1010             '../sync/sync.gyp:sync_java',
1011             '../third_party/guava/guava.gyp:guava_javalib',
1012             '../ui/android/ui_android.gyp:ui_java',
1013           ],
1014           'variables': {
1015             'java_in_dir': '../chrome/android/java',
1016             'has_java_resources': 1,
1017             'R_package': 'org.chromium.chrome',
1018             'R_package_relpath': 'org/chromium/chrome',
1019             'java_strings_grd': 'android_chrome_strings.grd',
1020             # Include xml string files generated from generated_resources.grd
1021             'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
1022             'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
1023           },
1024           'includes': [
1025             '../build/java.gypi',
1026           ],
1027         },
1028       ], # 'targets'
1029       'includes': [
1030         'chrome_android.gypi',
1031       ]}, # 'includes'
1032     ],  # OS=="android"
1033     ['configuration_policy==1 and OS!="android" and OS!="ios"', {
1034       'includes': [ 'policy.gypi', ],
1035     }],
1036     ['enable_printing==1', {
1037       'targets': [
1038         {
1039           'target_name': 'service',
1040           'type': 'static_library',
1041           'variables': { 'enable_wexit_time_destructors': 1, },
1042           'dependencies': [
1043             'chrome_resources.gyp:chrome_strings',
1044             'common',
1045             'common_net',
1046             '../base/base.gyp:base',
1047             '../components/components.gyp:cloud_devices',
1048             '../google_apis/google_apis.gyp:google_apis',
1049             '../jingle/jingle.gyp:notifier',
1050             '../net/net.gyp:net',
1051             '../printing/printing.gyp:printing',
1052             '../skia/skia.gyp:skia',
1053             '../third_party/libjingle/libjingle.gyp:libjingle',
1054           ],
1055           'sources': [
1056             'service/cloud_print/cdd_conversion_win.cc',
1057             'service/cloud_print/cdd_conversion_win.h',
1058             'service/cloud_print/cloud_print_auth.cc',
1059             'service/cloud_print/cloud_print_auth.h',
1060             'service/cloud_print/cloud_print_connector.cc',
1061             'service/cloud_print/cloud_print_connector.h',
1062             'service/cloud_print/cloud_print_proxy.cc',
1063             'service/cloud_print/cloud_print_proxy.h',
1064             'service/cloud_print/cloud_print_proxy_backend.cc',
1065             'service/cloud_print/cloud_print_proxy_backend.h',
1066             'service/cloud_print/cloud_print_service_helpers.cc',
1067             'service/cloud_print/cloud_print_service_helpers.h',
1068             'service/cloud_print/cloud_print_token_store.cc',
1069             'service/cloud_print/cloud_print_token_store.h',
1070             'service/cloud_print/cloud_print_url_fetcher.cc',
1071             'service/cloud_print/cloud_print_url_fetcher.h',
1072             'service/cloud_print/cloud_print_wipeout.cc',
1073             'service/cloud_print/cloud_print_wipeout.h',
1074             'service/cloud_print/connector_settings.cc',
1075             'service/cloud_print/connector_settings.h',
1076             'service/cloud_print/job_status_updater.cc',
1077             'service/cloud_print/job_status_updater.h',
1078             'service/cloud_print/print_system.cc',
1079             'service/cloud_print/print_system.h',
1080             'service/cloud_print/print_system_win.cc',
1081             'service/cloud_print/printer_job_handler.cc',
1082             'service/cloud_print/printer_job_handler.h',
1083             'service/cloud_print/printer_job_queue_handler.cc',
1084             'service/cloud_print/printer_job_queue_handler.h',
1085             'service/net/service_url_request_context.cc',
1086             'service/net/service_url_request_context.h',
1087             'service/service_ipc_server.cc',
1088             'service/service_ipc_server.h',
1089             'service/service_main.cc',
1090             'service/service_process.cc',
1091             'service/service_process.h',
1092             'service/service_process_prefs.cc',
1093             'service/service_process_prefs.h',
1094             'service/service_utility_process_host.cc',
1095             'service/service_utility_process_host.h',
1096           ],
1097           'include_dirs': [
1098             '..',
1099           ],
1100           'conditions': [
1101             ['toolkit_uses_gtk == 1', {
1102               'dependencies': [
1103                 '../build/linux/system.gyp:gtk',
1104               ],
1105             }],
1106             ['use_cups==1', {
1107               'dependencies': [
1108                 '../printing/printing.gyp:cups',
1109               ],
1110               'sources': [
1111                 'service/cloud_print/print_system_cups.cc',
1112               ],
1113             }],
1114             ['OS!="win" and use_cups!=1', {
1115               'sources': [
1116                 'service/cloud_print/print_system_dummy.cc',
1117               ],
1118             }],
1119           ],
1120         },
1121       ],
1122     }],
1123   ],  # 'conditions'