| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 if this_include_path: | 113 if this_include_path: |
| 114 paths_dict['include_paths'].append(this_include_path) | 114 paths_dict['include_paths'].append(this_include_path) |
| 115 | 115 |
| 116 | 116 |
| 117 def compute_info_individual(idl_filename, component_dir): | 117 def compute_info_individual(idl_filename, component_dir): |
| 118 full_path = os.path.realpath(idl_filename) | 118 full_path = os.path.realpath(idl_filename) |
| 119 idl_file_contents = get_file_contents(full_path) | 119 idl_file_contents = get_file_contents(full_path) |
| 120 | 120 |
| 121 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co
ntents) | 121 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co
ntents) |
| 122 implemented_as = extended_attributes.get('ImplementedAs') | 122 implemented_as = extended_attributes.get('ImplementedAs') |
| 123 this_include_path = include_path(idl_filename, implemented_as) | |
| 124 relative_dir = relative_dir_posix(idl_filename) | 123 relative_dir = relative_dir_posix(idl_filename) |
| 124 this_include_path = None if 'NoImplHeader' in extended_attributes else inclu
de_path(idl_filename, implemented_as) |
| 125 | 125 |
| 126 # Handle partial interfaces | 126 # Handle partial interfaces |
| 127 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) | 127 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) |
| 128 if partial_interface_name: | 128 if partial_interface_name: |
| 129 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) | 129 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) |
| 130 return | 130 return |
| 131 | 131 |
| 132 # If not a partial interface, the basename is the interface name | 132 # If not a partial interface, the basename is the interface name |
| 133 interface_name = idl_filename_to_interface_name(idl_filename) | 133 interface_name = idl_filename_to_interface_name(idl_filename) |
| 134 | 134 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 for idl_filename in idl_files: | 191 for idl_filename in idl_files: |
| 192 compute_info_individual(idl_filename, options.component_dir) | 192 compute_info_individual(idl_filename, options.component_dir) |
| 193 | 193 |
| 194 write_pickle_file(options.interfaces_info_file, | 194 write_pickle_file(options.interfaces_info_file, |
| 195 info_individual(), | 195 info_individual(), |
| 196 options.write_file_only_if_changed) | 196 options.write_file_only_if_changed) |
| 197 | 197 |
| 198 | 198 |
| 199 if __name__ == '__main__': | 199 if __name__ == '__main__': |
| 200 sys.exit(main()) | 200 sys.exit(main()) |
| OLD | NEW |