OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # | |
3 # Copyright 2015 The Chromium Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 | |
7 import fnmatch | |
8 import optparse | |
9 import os | |
10 import sys | |
11 | |
12 REPOSITORY_ROOT = os.path.abspath(os.path.join( | |
13 os.path.dirname(__file__), '..', '..', '..')) | |
14 | |
15 sys.path.append(os.path.join(REPOSITORY_ROOT, 'build/android/gyp/util')) | |
16 import build_utils | |
17 | |
18 | |
19 def GenerateJavadoc(options): | |
20 javadoc_cwd = options.javadoc_cwd | |
21 source_dir = options.source_dir | |
22 output_dir = options.output_dir | |
23 | |
24 build_utils.DeleteDirectory(output_dir) | |
25 build_utils.MakeDirectory(output_dir) | |
26 jar_cmd = ['ant', '-Dsource.dir=' + source_dir, | |
mef
2015/06/03 18:25:01
javadoc_cmd = ...
Why do you need ant? Can we run
xunjieli
2015/06/03 20:19:34
javadoc is horrendously hard to configure. For ins
mef
2015/06/03 22:00:54
I see. That's unfortunate, but I don't see any exa
xunjieli
2015/06/04 13:37:35
Acknowledged.
| |
27 '-Ddoc.dir=' + os.path.abspath(output_dir), 'doc'] | |
28 build_utils.CheckOutput(jar_cmd, cwd=javadoc_cwd) | |
29 | |
30 def main(): | |
31 parser = optparse.OptionParser() | |
32 parser.add_option('--source-dir', help='Source directory') | |
33 parser.add_option('--output-dir', help='Directory to put javadoc') | |
34 parser.add_option('--javadoc-cwd', help='Working directory') | |
mef
2015/06/03 18:25:01
maybe temp-dir or working-dir?
Can it be created
xunjieli
2015/06/03 20:19:34
Done.
| |
35 | |
36 options, _ = parser.parse_args() | |
37 | |
38 GenerateJavadoc(options) | |
39 | |
40 if __name__ == '__main__': | |
41 sys.exit(main()) | |
42 | |
OLD | NEW |