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