| OLD | NEW |
| 1 # Copyright (c) 2013 Google Inc. All rights reserved. | 1 # Copyright (c) 2013 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import collections | 5 import collections |
| 6 import copy | 6 import copy |
| 7 import hashlib | 7 import hashlib |
| 8 import json | 8 import json |
| 9 import multiprocessing | 9 import multiprocessing |
| 10 import os.path | 10 import os.path |
| (...skipping 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 ninja_file.write(ninja_output.getvalue()) | 2118 ninja_file.write(ninja_output.getvalue()) |
| 2119 ninja_output.close() | 2119 ninja_output.close() |
| 2120 master_ninja.subninja(output_file) | 2120 master_ninja.subninja(output_file) |
| 2121 | 2121 |
| 2122 if target: | 2122 if target: |
| 2123 if name != target.FinalOutput() and spec['toolset'] == 'target': | 2123 if name != target.FinalOutput() and spec['toolset'] == 'target': |
| 2124 target_short_names.setdefault(name, []).append(target) | 2124 target_short_names.setdefault(name, []).append(target) |
| 2125 target_outputs[qualified_target] = target | 2125 target_outputs[qualified_target] = target |
| 2126 if qualified_target in all_targets: | 2126 if qualified_target in all_targets: |
| 2127 all_outputs.add(target.FinalOutput()) | 2127 all_outputs.add(target.FinalOutput()) |
| 2128 else: |
| 2129 target_short_names.setdefault(name, []) |
| 2128 | 2130 |
| 2129 if target_short_names: | 2131 if target_short_names: |
| 2130 # Write a short name to build this target. This benefits both the | 2132 # Write a short name to build this target. This benefits both the |
| 2131 # "build chrome" case as well as the gyp tests, which expect to be | 2133 # "build chrome" case as well as the gyp tests, which expect to be |
| 2132 # able to run actions and build libraries by their short name. | 2134 # able to run actions and build libraries by their short name. |
| 2133 master_ninja.newline() | 2135 master_ninja.newline() |
| 2134 master_ninja.comment('Short names for targets.') | 2136 master_ninja.comment('Short names for targets.') |
| 2135 for short_name in target_short_names: | 2137 for short_name in target_short_names: |
| 2136 master_ninja.build(short_name, 'phony', [x.FinalOutput() for x in | 2138 master_ninja.build(short_name, 'phony', [x.FinalOutput() for x in |
| 2137 target_short_names[short_name]]) | 2139 target_short_names[short_name]]) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 arglists.append( | 2188 arglists.append( |
| 2187 (target_list, target_dicts, data, params, config_name)) | 2189 (target_list, target_dicts, data, params, config_name)) |
| 2188 pool.map(CallGenerateOutputForConfig, arglists) | 2190 pool.map(CallGenerateOutputForConfig, arglists) |
| 2189 except KeyboardInterrupt, e: | 2191 except KeyboardInterrupt, e: |
| 2190 pool.terminate() | 2192 pool.terminate() |
| 2191 raise e | 2193 raise e |
| 2192 else: | 2194 else: |
| 2193 for config_name in config_names: | 2195 for config_name in config_names: |
| 2194 GenerateOutputForConfig(target_list, target_dicts, data, params, | 2196 GenerateOutputForConfig(target_list, target_dicts, data, params, |
| 2195 config_name) | 2197 config_name) |
| OLD | NEW |