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.
5 # This file is meant to be included into a target to provide an action
6 # to compute global objects in a component.
8 # To use this, create a gyp target with the following form:
10 # 'target_name': 'core_global_constructors_idls',
12 # 'component_global_objects',
15 # 'idl_files': '<(list_of_idl_files)',
16 # 'global_objects_file': '<(some_dir)/GlobalObjectsComponent.pickle',
17 # 'global_names_idl_files': [
19 # '<(blink_core_output_dir)/GlobalScopeComponentConstructors.idl',
23 # '<@(component_global_constructors_generated_idl_files)',
24 # '<@(component_global_constructors_generated_header_files)',
27 # 'includes': ['path/to/this/gypi/file'],
31 # idl_files - List of .idl files that will be searched in.
32 # This should *only* contain main IDL files, excluding dependencies and
33 # testing, which should not appear on global objects.
34 # global_objects - Pickle file of global objects.
35 # global_names_idl_files - pairs (GlobalName, Constructors.idl)
36 # outputs - List of output files.
37 # Passed as a variable here, included by the template in the action.
39 # Spec: http://heycam.github.io/webidl/#Global
40 # http://heycam.github.io/webidl/#Exposed
41 # Design document: http://www.chromium.org/developers/design-documents/idl-build
46 'action_name': 'generate_<(_target_name)',
47 'message': 'Generating IDL files for constructors on global objects for <(_target_name)',
49 'idl_files_list': '<|(<(_target_name)_idl_files_list.tmp <@(idl_files))',
51 'includes': ['scripts.gypi'],
53 '<(bindings_scripts_dir)/generate_global_constructors.py',
54 '<(bindings_scripts_dir)/utilities.py',
57 '<(global_objects_file)',
59 'outputs': ['<@(outputs)'],
62 '<(bindings_scripts_dir)/generate_global_constructors.py',
65 '--global-objects-file',
66 '<(global_objects_file)',
67 '--write-file-only-if-changed',
68 '<(write_file_only_if_changed)',
70 '<@(global_names_idl_files)',