| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (C) 2013 Google Inc. All rights reserved. | 2 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 def generate_dictionary_impl(options, input_filename): | 159 def generate_dictionary_impl(options, input_filename): |
| 160 info_provider = create_component_info_provider( | 160 info_provider = create_component_info_provider( |
| 161 options.info_dir, options.target_component) | 161 options.info_dir, options.target_component) |
| 162 idl_compiler = IdlCompilerDictionaryImpl( | 162 idl_compiler = IdlCompilerDictionaryImpl( |
| 163 options.impl_output_directory, | 163 options.impl_output_directory, |
| 164 cache_directory=options.cache_directory, | 164 cache_directory=options.cache_directory, |
| 165 info_provider=info_provider, | 165 info_provider=info_provider, |
| 166 only_if_changed=options.write_file_only_if_changed) | 166 only_if_changed=options.write_file_only_if_changed) |
| 167 | 167 |
| 168 idl_filenames = read_idl_files_list_from_file(input_filename) | 168 idl_filenames = read_idl_files_list_from_file(input_filename, |
| 169 is_gyp_format=True) |
| 169 for idl_filename in idl_filenames: | 170 for idl_filename in idl_filenames: |
| 170 idl_compiler.compile_file(idl_filename) | 171 idl_compiler.compile_file(idl_filename) |
| 171 | 172 |
| 172 | 173 |
| 173 def generate_union_type_containers(options): | 174 def generate_union_type_containers(options): |
| 174 info_provider = create_component_info_provider( | 175 info_provider = create_component_info_provider( |
| 175 options.info_dir, options.target_component) | 176 options.info_dir, options.target_component) |
| 176 if not info_provider.interfaces_info: | 177 if not info_provider.interfaces_info: |
| 177 raise Exception('Interfaces info is required to generate ' | 178 raise Exception('Interfaces info is required to generate ' |
| 178 'union types containers') | 179 'union types containers') |
| (...skipping 14 matching lines...) Expand all Loading... |
| 193 # dictionary paths. | 194 # dictionary paths. |
| 194 generate_dictionary_impl(options, input_filename) | 195 generate_dictionary_impl(options, input_filename) |
| 195 generate_union_type_containers(options) | 196 generate_union_type_containers(options) |
| 196 else: | 197 else: |
| 197 # |input_filename| should be a path of an IDL file. | 198 # |input_filename| should be a path of an IDL file. |
| 198 generate_bindings(options, input_filename) | 199 generate_bindings(options, input_filename) |
| 199 | 200 |
| 200 | 201 |
| 201 if __name__ == '__main__': | 202 if __name__ == '__main__': |
| 202 sys.exit(main()) | 203 sys.exit(main()) |
| OLD | NEW |