OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 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 copy | 5 import copy |
6 import hashlib | 6 import hashlib |
7 import multiprocessing | 7 import multiprocessing |
8 import os.path | 8 import os.path |
9 import re | 9 import re |
10 import signal | 10 import signal |
(...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 # "build chrome" case as well as the gyp tests, which expect to be | 1736 # "build chrome" case as well as the gyp tests, which expect to be |
1737 # able to run actions and build libraries by their short name. | 1737 # able to run actions and build libraries by their short name. |
1738 master_ninja.newline() | 1738 master_ninja.newline() |
1739 master_ninja.comment('Short names for targets.') | 1739 master_ninja.comment('Short names for targets.') |
1740 for short_name in target_short_names: | 1740 for short_name in target_short_names: |
1741 master_ninja.build(short_name, 'phony', [x.FinalOutput() for x in | 1741 master_ninja.build(short_name, 'phony', [x.FinalOutput() for x in |
1742 target_short_names[short_name]]) | 1742 target_short_names[short_name]]) |
1743 | 1743 |
1744 if all_outputs: | 1744 if all_outputs: |
1745 master_ninja.newline() | 1745 master_ninja.newline() |
1746 master_ninja.build('all', 'phony', list(all_outputs)) | 1746 if 'all' not in target_short_names: |
| 1747 master_ninja.build('all', 'phony', list(all_outputs)) |
1747 master_ninja.default(generator_flags.get('default_target', 'all')) | 1748 master_ninja.default(generator_flags.get('default_target', 'all')) |
1748 | 1749 |
1749 | 1750 |
1750 def PerformBuild(data, configurations, params): | 1751 def PerformBuild(data, configurations, params): |
1751 options = params['options'] | 1752 options = params['options'] |
1752 for config in configurations: | 1753 for config in configurations: |
1753 builddir = os.path.join(options.toplevel_dir, 'out', config) | 1754 builddir = os.path.join(options.toplevel_dir, 'out', config) |
1754 arguments = ['ninja', '-C', builddir] | 1755 arguments = ['ninja', '-C', builddir] |
1755 print 'Building [%s]: %s' % (config, arguments) | 1756 print 'Building [%s]: %s' % (config, arguments) |
1756 subprocess.check_call(arguments) | 1757 subprocess.check_call(arguments) |
(...skipping 23 matching lines...) Expand all Loading... |
1780 arglists.append( | 1781 arglists.append( |
1781 (target_list, target_dicts, data, params, config_name)) | 1782 (target_list, target_dicts, data, params, config_name)) |
1782 pool.map(CallGenerateOutputForConfig, arglists) | 1783 pool.map(CallGenerateOutputForConfig, arglists) |
1783 except KeyboardInterrupt, e: | 1784 except KeyboardInterrupt, e: |
1784 pool.terminate() | 1785 pool.terminate() |
1785 raise e | 1786 raise e |
1786 else: | 1787 else: |
1787 for config_name in config_names: | 1788 for config_name in config_names: |
1788 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1789 GenerateOutputForConfig(target_list, target_dicts, data, params, |
1789 config_name) | 1790 config_name) |
OLD | NEW |