| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Creates a TOC file from a Java jar. | 7 """Creates a TOC file from a Java jar. |
| 8 | 8 |
| 9 The TOC file contains the non-package API of the jar. This includes all | 9 The TOC file contains the non-package API of the jar. This includes all |
| 10 public/protected/package classes/functions/members and the values of static | 10 public/protected/package classes/functions/members and the values of static |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 md5_check.CallAndRecordIfStale( | 85 md5_check.CallAndRecordIfStale( |
| 86 lambda: UpdateToc(jar_path, toc_path), | 86 lambda: UpdateToc(jar_path, toc_path), |
| 87 record_path=record_path, | 87 record_path=record_path, |
| 88 input_paths=[jar_path], | 88 input_paths=[jar_path], |
| 89 ) | 89 ) |
| 90 build_utils.Touch(toc_path) | 90 build_utils.Touch(toc_path) |
| 91 | 91 |
| 92 | 92 |
| 93 def main(): | 93 def main(): |
| 94 parser = optparse.OptionParser() | 94 parser = optparse.OptionParser() |
| 95 build_utils.AddDepfileOption(parser) |
| 96 |
| 95 parser.add_option('--jar-path', help='Input .jar path.') | 97 parser.add_option('--jar-path', help='Input .jar path.') |
| 96 parser.add_option('--toc-path', help='Output .jar.TOC path.') | 98 parser.add_option('--toc-path', help='Output .jar.TOC path.') |
| 97 parser.add_option('--stamp', help='Path to touch on success.') | 99 parser.add_option('--stamp', help='Path to touch on success.') |
| 98 | 100 |
| 99 options, _ = parser.parse_args() | 101 options, _ = parser.parse_args() |
| 100 | 102 |
| 101 DoJarToc(options) | 103 DoJarToc(options) |
| 102 | 104 |
| 105 if options.depfile: |
| 106 build_utils.WriteDepfile( |
| 107 options.depfile, |
| 108 build_utils.GetPythonDependencies()) |
| 109 |
| 103 if options.stamp: | 110 if options.stamp: |
| 104 build_utils.Touch(options.stamp) | 111 build_utils.Touch(options.stamp) |
| 105 | 112 |
| 106 | 113 |
| 107 if __name__ == '__main__': | 114 if __name__ == '__main__': |
| 108 sys.exit(main()) | 115 sys.exit(main()) |
| OLD | NEW |