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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 raise IdlInterfaceFileNotFoundError('Could not find the IDL file whe re the following implemented interface is defined: %s' % key_name) | 339 raise IdlInterfaceFileNotFoundError('Could not find the IDL file whe re the following implemented interface is defined: %s' % key_name) |
340 | 340 |
341 interface_info['dependencies_full_paths'] = ( | 341 interface_info['dependencies_full_paths'] = ( |
342 partial_interfaces_full_paths + | 342 partial_interfaces_full_paths + |
343 implemented_interfaces_full_paths) | 343 implemented_interfaces_full_paths) |
344 interface_info['dependencies_include_paths'] = ( | 344 interface_info['dependencies_include_paths'] = ( |
345 partial_interfaces_include_paths + | 345 partial_interfaces_include_paths + |
346 implemented_interfaces_include_paths) | 346 implemented_interfaces_include_paths) |
347 | 347 |
348 | 348 |
349 def clear_globals(): | |
350 interfaces_info.clear() | |
351 partial_interface_files.clear() | |
352 parent_interfaces.clear() | |
353 extended_attributes_by_interface.clear() # interface name -> extended attri butes | |
Nils Barth (inactive)
2014/03/03 01:32:48
Could you remove the comment at the end of the lin
terry
2014/03/13 19:58:18
Done.
| |
354 | |
355 | |
356 def compute(idl_files, interfaces_info_file, interface_dependencies_file, | |
Nils Barth (inactive)
2014/03/03 06:45:49
This function (and clear_globals()) won't be neces
| |
357 event_names_file, only_if_changed): | |
358 clear_globals() | |
359 | |
Nils Barth (inactive)
2014/03/03 01:32:48
Could you remove this blank line, as the function
terry
2014/03/13 19:58:18
Done.
| |
360 compute_interfaces_info(idl_files) | |
361 write_pickle_file(interfaces_info_file, interfaces_info, only_if_changed) | |
362 write_dependencies_file(interface_dependencies_file, only_if_changed) | |
Nils Barth (inactive)
2014/03/03 01:32:48
BTW, I'm removing the interface_dependencies_file
terry
2014/03/13 19:58:18
Done.
| |
363 write_event_names_file(event_names_file, only_if_changed) | |
364 | |
365 | |
349 ################################################################################ | 366 ################################################################################ |
350 | 367 |
351 def main(): | 368 def main(): |
352 options, args = parse_options() | 369 options, args = parse_options() |
353 | 370 |
354 # Static IDL files are passed in a file (generated at GYP time), due to OS | 371 # Static IDL files are passed in a file (generated at GYP time), due to OS |
355 # command line length limits | 372 # command line length limits |
356 with open(options.idl_files_list) as idl_files_list: | 373 with open(options.idl_files_list) as idl_files_list: |
357 idl_files = [line.rstrip('\n') for line in idl_files_list] | 374 idl_files = [line.rstrip('\n') for line in idl_files_list] |
358 # Generated IDL files are passed at the command line, since these are in the | 375 # Generated IDL files are passed at the command line, since these are in the |
359 # build directory, which is determined at build time, not GYP time, so these | 376 # build directory, which is determined at build time, not GYP time, so these |
360 # cannot be included in the file listing static files | 377 # cannot be included in the file listing static files |
361 idl_files.extend(args) | 378 idl_files.extend(args) |
362 | 379 |
363 only_if_changed = options.write_file_only_if_changed | 380 compute(idl_files, |
364 compute_interfaces_info(idl_files) | 381 options.interfaces_info_file, |
365 write_pickle_file(options.interfaces_info_file, interfaces_info, only_if_cha nged) | 382 options.interface_dependencies_file, |
366 write_dependencies_file(options.interface_dependencies_file, only_if_changed ) | 383 options.event_names_file, |
367 write_event_names_file(options.event_names_file, only_if_changed) | 384 options.write_file_only_if_changed) |
368 | 385 |
369 | 386 |
370 if __name__ == '__main__': | 387 if __name__ == '__main__': |
371 sys.exit(main()) | 388 sys.exit(main()) |
OLD | NEW |