OLD | NEW |
| (Empty) |
1 #!/usr/bin/env python | |
2 # | |
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 | |
5 # found in the LICENSE file. | |
6 | |
7 """Writes dependency ordered list of native libraries. | |
8 | |
9 This list of libraries is used for several steps of building an APK. | |
10 """ | |
11 | |
12 import json | |
13 import optparse | |
14 import os | |
15 import sys | |
16 | |
17 from pylib import build_utils | |
18 | |
19 | |
20 def main(argv): | |
21 parser = optparse.OptionParser() | |
22 | |
23 parser.add_option('--input-libraries', | |
24 help='A list of top-level input libraries') | |
25 parser.add_option('--output', help='Path to the generated .json file') | |
26 parser.add_option('--stamp', help='Path to touch on success') | |
27 | |
28 options, _ = parser.parse_args() | |
29 | |
30 libraries = build_utils.ParseGypList(options.input_libraries) | |
31 libraries = [os.path.basename(lib) for lib in libraries] | |
32 | |
33 with open(options.output, 'w') as outfile: | |
34 json.dump(libraries, outfile) | |
35 | |
36 if options.stamp: | |
37 build_utils.Touch(options.stamp) | |
38 | |
39 | |
40 if __name__ == '__main__': | |
41 sys.exit(main(sys.argv)) | |
42 | |
43 | |
OLD | NEW |