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 """Writes dependency ordered list of native libraries. | 7 """Writes dependency ordered list of native libraries. |
8 | 8 |
9 The list excludes any Android system libraries, as those are not bundled with | 9 The list excludes any Android system libraries, as those are not bundled with |
10 the APK. | 10 the APK. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 global _options | 100 global _options |
101 _options, _ = parser.parse_args() | 101 _options, _ = parser.parse_args() |
102 | 102 |
103 libraries = build_utils.ParseGypList(_options.input_libraries) | 103 libraries = build_utils.ParseGypList(_options.input_libraries) |
104 global _libraries_dir | 104 global _libraries_dir |
105 _libraries_dir = os.path.dirname(libraries[0]) | 105 _libraries_dir = os.path.dirname(libraries[0]) |
106 libraries = [os.path.basename(lib) for lib in libraries] | 106 libraries = [os.path.basename(lib) for lib in libraries] |
107 | 107 |
108 libraries = GetSortedTransitiveDependencies(libraries) | 108 libraries = GetSortedTransitiveDependencies(libraries) |
109 | 109 |
110 with open(_options.output, 'w') as outfile: | 110 build_utils.WriteJson(libraries, _options.output, only_if_changed=True) |
111 json.dump(libraries, outfile) | |
112 | 111 |
113 if _options.stamp: | 112 if _options.stamp: |
114 build_utils.Touch(_options.stamp) | 113 build_utils.Touch(_options.stamp) |
115 | 114 |
116 | 115 |
117 if __name__ == '__main__': | 116 if __name__ == '__main__': |
118 sys.exit(main(sys.argv)) | 117 sys.exit(main(sys.argv)) |
119 | 118 |
120 | 119 |
OLD | NEW |