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': 'component_global_objects',
12 # 'idl_files': '<(list_of_idl_files)',
13 # 'input_files': ['<(some_dir)/GlobalObjectBaseComponent.pickle'],
14 # 'output_file': '<(some_dir)/GlobalObjectsComponent.pickle',
16 # 'includes': ['path/to/this/gypi/file'],
20 # idl_files - List of .idl files that will be searched in.
21 # This should *only* contain main IDL files, excluding dependencies and
22 # testing, which should not define global objects.
23 # output_file - Pickle file of output.
26 # input_files - List of input pickle files of global objects in base
27 # components. In this case make sure to include a dependencies section
28 # in the target to ensure this is generated.
30 # Spec: http://heycam.github.io/webidl/#Global
31 # Design document: http://www.chromium.org/developers/design-documents/idl-build
36 'action_name': 'compute_<(_target_name)',
37 'message': 'Computing global objects for <(_target_name)',
40 'idl_files_list': '<|(<(_target_name)_idl_files_list.tmp <@(idl_files))',
42 'includes': ['scripts.gypi'],
44 '<(bindings_scripts_dir)/compute_global_objects.py',
45 '<(bindings_scripts_dir)/utilities.py',
54 '<(bindings_scripts_dir)/compute_global_objects.py',
57 '--write-file-only-if-changed',
58 '<(write_file_only_if_changed)',