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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 def main(): | 95 def main(): |
96 parser = optparse.OptionParser() | 96 parser = optparse.OptionParser() |
97 build_utils.AddDepfileOption(parser) | 97 build_utils.AddDepfileOption(parser) |
98 | 98 |
99 parser.add_option('--jar-path', help='Input .jar path.') | 99 parser.add_option('--jar-path', help='Input .jar path.') |
100 parser.add_option('--toc-path', help='Output .jar.TOC path.') | 100 parser.add_option('--toc-path', help='Output .jar.TOC path.') |
101 parser.add_option('--stamp', help='Path to touch on success.') | 101 parser.add_option('--stamp', help='Path to touch on success.') |
102 | 102 |
103 options, _ = parser.parse_args() | 103 options, _ = parser.parse_args() |
104 | 104 |
| 105 if options.depfile: |
| 106 build_utils.WriteDepfile( |
| 107 options.depfile, |
| 108 build_utils.GetPythonDependencies()) |
| 109 |
105 DoJarToc(options) | 110 DoJarToc(options) |
106 | 111 |
107 if options.depfile: | 112 if options.depfile: |
108 build_utils.WriteDepfile( | 113 build_utils.WriteDepfile( |
109 options.depfile, | 114 options.depfile, |
110 build_utils.GetPythonDependencies()) | 115 build_utils.GetPythonDependencies()) |
111 | 116 |
112 if options.stamp: | 117 if options.stamp: |
113 build_utils.Touch(options.stamp) | 118 build_utils.Touch(options.stamp) |
114 | 119 |
115 | 120 |
116 if __name__ == '__main__': | 121 if __name__ == '__main__': |
117 sys.exit(main()) | 122 sys.exit(main()) |
OLD | NEW |