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 = include_path(idl_filename, implemented_as) | 335 # FIXME: remove [NoHeader] once switch to Python |
| 336 this_include_path = (include_path(idl_filename, implemented_as) |
| 337 if 'NoHeader' not in extended_attributes else None) |
336 | 338 |
337 # Handle partial interfaces | 339 # Handle partial interfaces |
338 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) | 340 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) |
339 if partial_interface_name: | 341 if partial_interface_name: |
340 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) | 342 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) |
341 return False | 343 return False |
342 | 344 |
343 # If not a partial interface, the basename is the interface name | 345 # If not a partial interface, the basename is the interface name |
344 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) | 346 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) |
345 | 347 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 write_dependencies_file(options.interface_dependencies_file, only_if_changed
) | 562 write_dependencies_file(options.interface_dependencies_file, only_if_changed
) |
561 write_pickle_file(options.interfaces_info_file, interfaces_info, only_if_cha
nged) | 563 write_pickle_file(options.interfaces_info_file, interfaces_info, only_if_cha
nged) |
562 for interface_name, filename in global_constructors_filenames.iteritems(): | 564 for interface_name, filename in global_constructors_filenames.iteritems(): |
563 if interface_name in interfaces_info: | 565 if interface_name in interfaces_info: |
564 write_global_constructors_partial_interface(interface_name, filename
, global_constructors[interface_name], only_if_changed) | 566 write_global_constructors_partial_interface(interface_name, filename
, global_constructors[interface_name], only_if_changed) |
565 write_event_names_file(options.event_names_file, only_if_changed) | 567 write_event_names_file(options.event_names_file, only_if_changed) |
566 | 568 |
567 | 569 |
568 if __name__ == '__main__': | 570 if __name__ == '__main__': |
569 main() | 571 main() |
OLD | NEW |