| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (C) 2013 Google Inc. All rights reserved. | 3 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 paths_dict['include_paths'].append(this_include_path) | 325 paths_dict['include_paths'].append(this_include_path) |
| 326 | 326 |
| 327 | 327 |
| 328 def generate_dependencies(idl_filename): | 328 def generate_dependencies(idl_filename): |
| 329 """Compute dependencies for IDL file, returning True if main (non-partial) i
nterface""" | 329 """Compute dependencies for IDL file, returning True if main (non-partial) i
nterface""" |
| 330 full_path = os.path.realpath(idl_filename) | 330 full_path = os.path.realpath(idl_filename) |
| 331 idl_file_contents = get_file_contents(full_path) | 331 idl_file_contents = get_file_contents(full_path) |
| 332 | 332 |
| 333 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co
ntents) | 333 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co
ntents) |
| 334 implemented_as = extended_attributes.get('ImplementedAs') | 334 implemented_as = extended_attributes.get('ImplementedAs') |
| 335 this_include_path = ( | 335 this_include_path = include_path(idl_filename, implemented_as) |
| 336 include_path(idl_filename, implemented_as) | |
| 337 # implemented interfaces with [LegacyImplementedInBaseClass] have no | |
| 338 # header of their own, as they just use the header of the base class | |
| 339 if 'LegacyImplementedInBaseClass' not in extended_attributes else None) | |
| 340 | 336 |
| 341 # Handle partial interfaces | 337 # Handle partial interfaces |
| 342 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) | 338 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) |
| 343 if partial_interface_name: | 339 if partial_interface_name: |
| 344 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) | 340 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) |
| 345 return False | 341 return False |
| 346 | 342 |
| 347 # If not a partial interface, the basename is the interface name | 343 # If not a partial interface, the basename is the interface name |
| 348 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) | 344 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) |
| 349 | 345 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 write_dependencies_file(options.interface_dependencies_file, only_if_changed
) | 560 write_dependencies_file(options.interface_dependencies_file, only_if_changed
) |
| 565 write_pickle_file(options.interfaces_info_file, interfaces_info, only_if_cha
nged) | 561 write_pickle_file(options.interfaces_info_file, interfaces_info, only_if_cha
nged) |
| 566 for interface_name, filename in global_constructors_filenames.iteritems(): | 562 for interface_name, filename in global_constructors_filenames.iteritems(): |
| 567 if interface_name in interfaces_info: | 563 if interface_name in interfaces_info: |
| 568 write_global_constructors_partial_interface(interface_name, filename
, global_constructors[interface_name], only_if_changed) | 564 write_global_constructors_partial_interface(interface_name, filename
, global_constructors[interface_name], only_if_changed) |
| 569 write_event_names_file(options.event_names_file, only_if_changed) | 565 write_event_names_file(options.event_names_file, only_if_changed) |
| 570 | 566 |
| 571 | 567 |
| 572 if __name__ == '__main__': | 568 if __name__ == '__main__': |
| 573 main() | 569 main() |
| OLD | NEW |