| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (C) 2009 Google Inc. All rights reserved. | 3 # Copyright (C) 2009 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 # action_derivedsourcesallinone.py generates a single cpp file that includes | 35 # action_derivedsourcesallinone.py generates a single cpp file that includes |
| 36 # all v8 bindings cpp files generated from idls. Files can be assigned into | 36 # all v8 bindings cpp files generated from idls. Files can be assigned into |
| 37 # multiple output files, to reduce maximum compilation unit size and allow | 37 # multiple output files, to reduce maximum compilation unit size and allow |
| 38 # parallel compilation. | 38 # parallel compilation. |
| 39 # | 39 # |
| 40 # usage: action_derivedsourcesallinone.py IDL_FILES_LIST -- OUTPUT_FILE1 OUTPUT_
FILE2 ... | 40 # usage: action_derivedsourcesallinone.py IDL_FILES_LIST -- OUTPUT_FILE1 OUTPUT_
FILE2 ... |
| 41 # | 41 # |
| 42 # Note that IDL_FILES_LIST is a text file containing the IDL file paths. | 42 # Note that IDL_FILES_LIST is a text file containing the IDL file paths. |
| 43 | 43 |
| 44 # FIXME: Move to bindings/scripts |
| 45 |
| 44 import errno | 46 import errno |
| 45 import os | 47 import os |
| 46 import os.path | 48 import os.path |
| 47 import re | 49 import re |
| 48 import subprocess | 50 import subprocess |
| 49 import sys | 51 import sys |
| 50 | 52 |
| 51 # A regexp for finding Conditional attributes in interface definitions. | 53 # A regexp for finding Conditional attributes in interface definitions. |
| 52 conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z
&|]*)') | 54 conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z
&|]*)') |
| 53 | 55 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 for fileName in outputFileNames: | 218 for fileName in outputFileNames: |
| 217 partition = outputFileNames.index(fileName) | 219 partition = outputFileNames.index(fileName) |
| 218 fileContents = generateContent(filesMetaData, partition, len(outputFileN
ames)) | 220 fileContents = generateContent(filesMetaData, partition, len(outputFileN
ames)) |
| 219 writeContent(fileContents, fileName) | 221 writeContent(fileContents, fileName) |
| 220 | 222 |
| 221 return 0 | 223 return 0 |
| 222 | 224 |
| 223 | 225 |
| 224 if __name__ == '__main__': | 226 if __name__ == '__main__': |
| 225 sys.exit(main(sys.argv)) | 227 sys.exit(main(sys.argv)) |
| OLD | NEW |