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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 ) | 90 ) |
91 build_utils.Touch(toc_path) | 91 build_utils.Touch(toc_path) |
92 | 92 |
93 | 93 |
94 def main(argv): | 94 def main(argv): |
95 parser = optparse.OptionParser() | 95 parser = optparse.OptionParser() |
96 parser.add_option('--jar-path', help='Input .jar path.') | 96 parser.add_option('--jar-path', help='Input .jar path.') |
97 parser.add_option('--toc-path', help='Output .jar.TOC path.') | 97 parser.add_option('--toc-path', help='Output .jar.TOC path.') |
98 parser.add_option('--stamp', help='Path to touch on success.') | 98 parser.add_option('--stamp', help='Path to touch on success.') |
99 | 99 |
100 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. | |
101 parser.add_option('--ignore', help='Ignored.') | |
102 | |
103 options, _ = parser.parse_args() | 100 options, _ = parser.parse_args() |
104 | 101 |
105 DoJarToc(options) | 102 DoJarToc(options) |
106 | 103 |
107 if options.stamp: | 104 if options.stamp: |
108 build_utils.Touch(options.stamp) | 105 build_utils.Touch(options.stamp) |
109 | 106 |
110 | 107 |
111 if __name__ == '__main__': | 108 if __name__ == '__main__': |
112 sys.exit(main(sys.argv)) | 109 sys.exit(main(sys.argv)) |
OLD | NEW |