OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 Google Inc. All rights reserved. | 2 # Copyright (c) 2012 Google Inc. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 module = modules_by_name[name] | 320 module = modules_by_name[name] |
321 | 321 |
322 command = '' | 322 command = '' |
323 dependencies = module.get('dependencies', []) | 323 dependencies = module.get('dependencies', []) |
324 if recursively: | 324 if recursively: |
325 for dependency in dependencies: | 325 for dependency in dependencies: |
326 command += dump_module(dependency, recursively, processed_modules) | 326 command += dump_module(dependency, recursively, processed_modules) |
327 command += module_arg(name) + ':' | 327 command += module_arg(name) + ':' |
328 filtered_scripts = descriptors.module_compiled_files(name) | 328 filtered_scripts = descriptors.module_compiled_files(name) |
329 filtered_scripts = [path.join(devtools_frontend_path, name, script) for scri
pt in filtered_scripts] | 329 filtered_scripts = [path.join(devtools_frontend_path, name, script) for scri
pt in filtered_scripts] |
330 # TODO(dgozman): move to separate module | 330 if name == 'protocol': |
331 if name == 'sdk': | |
332 filtered_scripts.append(protocol_externs_file) | 331 filtered_scripts.append(protocol_externs_file) |
333 command += str(len(filtered_scripts)) | 332 command += str(len(filtered_scripts)) |
334 first_dependency = True | 333 first_dependency = True |
335 for dependency in dependencies + [runtime_module_name]: | 334 for dependency in dependencies + [runtime_module_name]: |
336 if first_dependency: | 335 if first_dependency: |
337 command += ':' | 336 command += ':' |
338 else: | 337 else: |
339 command += ',' | 338 command += ',' |
340 first_dependency = False | 339 first_dependency = False |
341 command += jsmodule_name_prefix + dependency | 340 command += jsmodule_name_prefix + dependency |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j
s_compile_out | 449 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j
s_compile_out |
451 errors_found |= has_errors(devtools_js_compile_out) | 450 errors_found |= has_errors(devtools_js_compile_out) |
452 | 451 |
453 os.remove(compiler_args_file.name) | 452 os.remove(compiler_args_file.name) |
454 os.remove(protocol_externs_file) | 453 os.remove(protocol_externs_file) |
455 shutil.rmtree(modules_dir, True) | 454 shutil.rmtree(modules_dir, True) |
456 | 455 |
457 if errors_found: | 456 if errors_found: |
458 print 'ERRORS DETECTED' | 457 print 'ERRORS DETECTED' |
459 sys.exit(1) | 458 sys.exit(1) |
OLD | NEW |