Home | History | Annotate | Download | only in modules
      1 # Copyright 2014 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.
      4 
      5 # Generate IDL interfaces info for modules, used to generate bindings
      6 #
      7 # Design doc: http://www.chromium.org/developers/design-documents/idl-build
      8 
      9 {
     10   'includes': [
     11     # ../.. == Source
     12     '../../bindings/core/core.gypi',
     13     '../../bindings/scripts/scripts.gypi',
     14     '../../build/scripts/scripts.gypi',  # FIXME: Needed for event files, should be in modules, not bindings_modules http://crbug.com/358074
     15     '../../modules/modules.gypi',
     16     'generated.gypi',
     17     'idl.gypi',
     18     'modules.gypi',
     19   ],
     20 
     21   'targets': [
     22 ################################################################################
     23   {
     24     # GN version: //third_party/WebKit/Source/bindings/modules:bindings_modules_generated
     25     # FIXME: Should be in modules, not bindings_modules http://crbug.com/358074
     26     'target_name': 'modules_event_generated',
     27     'type': 'none',
     28     'actions': [
     29       {
     30         # GN version: //third_party/WebKit/Source/bindings/modules:modules_bindings_generated_event_interfaces
     31         'action_name': 'event_interfaces',
     32         'variables': {
     33           'event_idl_files': [
     34             '<@(modules_event_idl_files)',
     35           ],
     36           'event_idl_files_list':
     37               '<|(event_idl_files_list.tmp <@(event_idl_files))',
     38         },
     39         'inputs': [
     40           '<(bindings_scripts_dir)/generate_event_interfaces.py',
     41           '<(bindings_scripts_dir)/utilities.py',
     42           '<(event_idl_files_list)',
     43           '<@(event_idl_files)',
     44         ],
     45         'outputs': [
     46           '<(blink_modules_output_dir)/EventModulesInterfaces.in',
     47         ],
     48         'action': [
     49           'python',
     50           '<(bindings_scripts_dir)/generate_event_interfaces.py',
     51           '--event-idl-files-list',
     52           '<(event_idl_files_list)',
     53           '--event-interfaces-file',
     54           '<(blink_modules_output_dir)/EventModulesInterfaces.in',
     55           '--write-file-only-if-changed',
     56           '<(write_file_only_if_changed)',
     57           '--suffix',
     58           'Modules',
     59         ],
     60       },
     61       {
     62         # GN version: //third_party/WebKit/Source/bindings/modules:bindings_modules_generated_event_modules_factory
     63         'action_name': 'EventModulesFactory',
     64         'inputs': [
     65           '<@(make_event_factory_files)',
     66           '<(blink_modules_output_dir)/EventModulesInterfaces.in',
     67         ],
     68         'outputs': [
     69           '<(blink_modules_output_dir)/EventModules.cpp',
     70           '<(blink_modules_output_dir)/EventModulesHeaders.h',
     71         ],
     72         'action': [
     73           'python',
     74           '../../build/scripts/make_event_factory.py',
     75           '<(blink_modules_output_dir)/EventModulesInterfaces.in',
     76           '--output_dir',
     77           '<(blink_modules_output_dir)',
     78         ],
     79       },
     80       {
     81         # GN version: //third_party/WebKit/Source/bindings/modules:bindings_modules_generated_event_modules_names
     82         'action_name': 'EventModulesNames',
     83         'inputs': [
     84           '<@(make_names_files)',
     85           '<(blink_modules_output_dir)/EventModulesInterfaces.in',
     86         ],
     87         'outputs': [
     88           '<(blink_modules_output_dir)/EventModulesNames.cpp',
     89           '<(blink_modules_output_dir)/EventModulesNames.h',
     90         ],
     91         'action': [
     92           'python',
     93           '../../build/scripts/make_names.py',
     94           '<(blink_modules_output_dir)/EventModulesInterfaces.in',
     95           '--output_dir',
     96           '<(blink_modules_output_dir)',
     97         ],
     98       },
     99       {
    100         # GN version: //third_party/WebKit/Source/bindings/modules:bindings_modules_generated_event_target_modules_names
    101         'action_name': 'EventTargetModulesNames',
    102         'inputs': [
    103           '<@(make_names_files)',
    104           '../../modules/EventTargetModulesFactory.in',
    105         ],
    106         'outputs': [
    107           '<(blink_modules_output_dir)/EventTargetModulesNames.cpp',
    108           '<(blink_modules_output_dir)/EventTargetModulesNames.h',
    109         ],
    110         'action': [
    111           'python',
    112           '../../build/scripts/make_names.py',
    113           '../../modules/EventTargetModulesFactory.in',
    114           '--output_dir',
    115           '<(blink_modules_output_dir)',
    116         ],
    117       },
    118     ],
    119   },
    120 ################################################################################
    121   {
    122     'target_name': 'modules_global_objects',
    123     'dependencies': [
    124       '../core/generated.gyp:core_global_objects',
    125     ],
    126     'variables': {
    127       'idl_files': '<(modules_idl_files)',
    128       'input_files': [
    129         '<(bindings_core_output_dir)/GlobalObjectsCore.pickle',
    130       ],
    131       'output_file':
    132         '<(bindings_modules_output_dir)/GlobalObjectsModules.pickle',
    133     },
    134     'includes': ['../../bindings/scripts/global_objects.gypi'],
    135   },
    136 ################################################################################
    137   {
    138     # Global constructors for global objects in modules (ServiceWorker)
    139     # but interfaces in core.
    140     'target_name': 'modules_core_global_constructors_idls',
    141     'dependencies': [
    142       'modules_global_objects',
    143     ],
    144     'variables': {
    145       'idl_files': '<(core_idl_files)',
    146       'global_objects_file':
    147         '<(bindings_modules_output_dir)/GlobalObjectsModules.pickle',
    148       'global_names_idl_files': [
    149         'ServiceWorkerGlobalScope',
    150         '<(blink_modules_output_dir)/ServiceWorkerGlobalScopeCoreConstructors.idl',
    151       ],
    152       'outputs': [
    153         '<@(modules_core_global_constructors_generated_idl_files)',
    154         '<@(modules_core_global_constructors_generated_header_files)',
    155       ],
    156     },
    157     'includes': ['../../bindings/scripts/global_constructors.gypi'],
    158   },
    159 ################################################################################
    160   {
    161     'target_name': 'modules_global_constructors_idls',
    162     'dependencies': [
    163       'modules_global_objects',
    164     ],
    165     'variables': {
    166       'idl_files': '<(modules_idl_files)',
    167       'global_objects_file':
    168         '<(bindings_modules_output_dir)/GlobalObjectsModules.pickle',
    169       'global_names_idl_files': [
    170         'Window',
    171         '<(blink_modules_output_dir)/WindowModulesConstructors.idl',
    172         'SharedWorkerGlobalScope',
    173         '<(blink_modules_output_dir)/SharedWorkerGlobalScopeModulesConstructors.idl',
    174         'DedicatedWorkerGlobalScope',
    175         '<(blink_modules_output_dir)/DedicatedWorkerGlobalScopeModulesConstructors.idl',
    176         'ServiceWorkerGlobalScope',
    177         '<(blink_modules_output_dir)/ServiceWorkerGlobalScopeModulesConstructors.idl',
    178       ],
    179       'outputs': [
    180         '<@(modules_global_constructors_generated_idl_files)',
    181         '<@(modules_global_constructors_generated_header_files)',
    182       ],
    183     },
    184     'includes': ['../../bindings/scripts/global_constructors.gypi'],
    185   },
    186 ################################################################################
    187   {
    188     'target_name': 'interfaces_info_individual_modules',
    189     'dependencies': [
    190       'modules_core_global_constructors_idls',
    191       'modules_global_constructors_idls',
    192     ],
    193     'variables': {
    194       'static_idl_files': '<(modules_static_idl_files)',
    195       'generated_idl_files': '<(modules_generated_idl_files)',
    196       'output_file':
    197         '<(bindings_modules_output_dir)/InterfacesInfoModulesIndividual.pickle',
    198     },
    199     'includes': ['../../bindings/scripts/interfaces_info_individual.gypi'],
    200   },
    201 ################################################################################
    202   {
    203     # GN version: //third_party/WebKit/Source/bindings/modules:interfaces_info
    204     'target_name': 'interfaces_info',
    205     'dependencies': [
    206         '../core/generated.gyp:interfaces_info_individual_core',
    207         'interfaces_info_individual_modules',
    208     ],
    209     'variables': {
    210       'input_files': [
    211         '<(bindings_core_output_dir)/InterfacesInfoCoreIndividual.pickle',
    212         '<(bindings_modules_output_dir)/InterfacesInfoModulesIndividual.pickle',
    213       ],
    214       'output_file':
    215         '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle',
    216     },
    217     'includes': ['../../bindings/scripts/interfaces_info_overall.gypi'],
    218   },
    219 ################################################################################
    220   ],  # targets
    221 }
    222