| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Generate java source files from protobuf files. | 6 """Generate java source files from protobuf files. |
| 7 | 7 |
| 8 This is a helper file for the genproto_java action in protoc_java.gypi. | 8 This is a helper file for the genproto_java action in protoc_java.gypi. |
| 9 | 9 |
| 10 It performs the following steps: | 10 It performs the following steps: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 [options.protoc, '--proto_path', options.proto_path, out_arg] | 50 [options.protoc, '--proto_path', options.proto_path, out_arg] |
| 51 + args) | 51 + args) |
| 52 | 52 |
| 53 if options.java_out_dir: | 53 if options.java_out_dir: |
| 54 build_utils.DeleteDirectory(options.java_out_dir) | 54 build_utils.DeleteDirectory(options.java_out_dir) |
| 55 shutil.copytree(temp_dir, options.java_out_dir) | 55 shutil.copytree(temp_dir, options.java_out_dir) |
| 56 else: | 56 else: |
| 57 build_utils.ZipDir(options.srcjar, temp_dir) | 57 build_utils.ZipDir(options.srcjar, temp_dir) |
| 58 | 58 |
| 59 if options.depfile: | 59 if options.depfile: |
| 60 build_utils.WriteDepfile( | 60 assert options.srcjar |
| 61 options.depfile, | 61 deps = args + [options.protoc] |
| 62 args + [options.protoc] + build_utils.GetPythonDependencies()) | 62 build_utils.WriteDepfile(options.depfile, options.srcjar, deps) |
| 63 | 63 |
| 64 if options.stamp: | 64 if options.stamp: |
| 65 build_utils.Touch(options.stamp) | 65 build_utils.Touch(options.stamp) |
| 66 | 66 |
| 67 if __name__ == '__main__': | 67 if __name__ == '__main__': |
| 68 sys.exit(main(sys.argv[1:])) | 68 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |