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 import json | |
8 import optparse | |
9 import os | |
10 import sys | |
11 | |
12 from pylib import build_utils | |
13 | |
14 | |
joth
2013/04/01 18:46:37
ditto
cjhopman
2013/04/01 20:11:14
Done.
| |
15 def main(argv): | |
16 parser = optparse.OptionParser() | |
17 | |
18 parser.add_option('--input-libraries', | |
19 help='A list of top-level input libraries') | |
20 parser.add_option('--output', help='Path to the generated .json file') | |
21 parser.add_option('--stamp', help='Path to touch on success') | |
22 | |
23 options, _ = parser.parse_args() | |
24 | |
25 libraries = build_utils.ParseGypList(options.input_libraries) | |
26 libraries = [os.path.basename(lib) for lib in libraries] | |
27 | |
28 with open(options.output, 'w') as outfile: | |
29 json.dump(libraries, outfile) | |
30 | |
31 if options.stamp: | |
32 build_utils.Touch(options.stamp) | |
33 | |
34 | |
35 if __name__ == '__main__': | |
36 sys.exit(main(sys.argv)) | |
37 | |
38 | |
OLD | NEW |