| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 # | 4 # |
| 5 # This file is meant to be included into a target to provide an action | 5 # This file is meant to be included into a target to provide an action |
| 6 # to compute global objects in a component. | 6 # to compute global objects in a component. |
| 7 # | 7 # |
| 8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
| 9 # { | 9 # { |
| 10 # 'target_name': 'component_global_objects', | 10 # 'target_name': 'component_global_objects', |
| 11 # 'variables': { | 11 # 'variables': { |
| 12 # 'idl_files': '<(list_of_idl_files)', | 12 # 'idl_files': '<(list_of_idl_files)', |
| 13 # 'input_files': ['<(some_dir)/GlobalObjectBaseComponent.pickle'], | 13 # 'input_files': ['<(some_dir)/GlobalObjectBaseComponent.pickle'], |
| 14 # 'output_file': '<(some_dir)/GlobalObjectsComponent.pickle', | 14 # 'output_file': '<(some_dir)/GlobalObjectsComponent.pickle', |
| 15 # }, | 15 # }, |
| 16 # 'includes': ['path/to/this/gypi/file'], | 16 # 'includes': ['path/to/this/gypi/file'], |
| 17 # }, | 17 # }, |
| 18 # | 18 # |
| 19 # Required variables: | 19 # Required variables: |
| 20 # idl_files - List of .idl files that will be searched in. | 20 # idl_files - List of .idl files that will be searched in. |
| 21 # This should *only* contain main IDL files, excluding dependencies and | 21 # This should *only* contain main IDL files, excluding dependencies and |
| 22 # testing, which should not define global objects). | 22 # testing, which should not define global objects. |
| 23 # output_file - Pickle file of output. | 23 # output_file - Pickle file of output. |
| 24 # | 24 # |
| 25 # Optional variables: | 25 # Optional variables: |
| 26 # input_files - List of input pickle files of global objects in base | 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 | 27 # components. In this case make sure to include a dependencies section |
| 28 # in the target to ensure this is generated. | 28 # in the target to ensure this is generated. |
| 29 # | 29 # |
| 30 # Spec: http://heycam.github.io/webidl/#Global | 30 # Spec: http://heycam.github.io/webidl/#Global |
| 31 # Design document: http://www.chromium.org/developers/design-documents/idl-build | 31 # Design document: http://www.chromium.org/developers/design-documents/idl-build |
| 32 | 32 |
| 33 { | 33 { |
| 34 'type': 'none', | 34 'type': 'none', |
| 35 'actions': [{ | 35 'actions': [{ |
| 36 'action_name': 'compute_<(_target_name)', | 36 'action_name': 'compute_<(_target_name)', |
| 37 'message': 'Computing global objects for <(_target_name)', | 37 'message': 'Computing global objects for <(_target_name)', |
| 38 'variables': { | 38 'variables': { |
| 39 'input_files%': [], | 39 'input_files%': [], |
| 40 'idl_files_list': '<|(idl_files_list.tmp <@(idl_files))', | 40 'idl_files_list': '<|(<(_target_name)_idl_files_list.tmp <@(idl_files))', |
| 41 }, | 41 }, |
| 42 'includes': ['scripts.gypi'], | 42 'includes': ['scripts.gypi'], |
| 43 'inputs': [ | 43 'inputs': [ |
| 44 '<(bindings_scripts_dir)/compute_global_objects.py', | 44 '<(bindings_scripts_dir)/compute_global_objects.py', |
| 45 '<(bindings_scripts_dir)/utilities.py', | 45 '<(bindings_scripts_dir)/utilities.py', |
| 46 '<(idl_files_list)', | 46 '<(idl_files_list)', |
| 47 '<@(idl_files)', | 47 '<@(idl_files)', |
| 48 ], | 48 ], |
| 49 'outputs': [ | 49 'outputs': [ |
| 50 '<(output_file)', | 50 '<(output_file)', |
| 51 ], | 51 ], |
| 52 'action': [ | 52 'action': [ |
| 53 'python', | 53 'python', |
| 54 '<(bindings_scripts_dir)/compute_global_objects.py', | 54 '<(bindings_scripts_dir)/compute_global_objects.py', |
| 55 '--idl-files-list', | 55 '--idl-files-list', |
| 56 '<(idl_files_list)', | 56 '<(idl_files_list)', |
| 57 '--write-file-only-if-changed', | 57 '--write-file-only-if-changed', |
| 58 '<(write_file_only_if_changed)', | 58 '<(write_file_only_if_changed)', |
| 59 '--', | 59 '--', |
| 60 '<@(input_files)', | 60 '<@(input_files)', |
| 61 '<(output_file)', | 61 '<(output_file)', |
| 62 ], | 62 ], |
| 63 }], | 63 }], |
| 64 } | 64 } |
| OLD | NEW |