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 gyp | 5 import gyp |
6 import gyp.common | 6 import gyp.common |
7 import gyp.system_test | 7 import gyp.system_test |
8 import gyp.xcode_emulation | 8 import gyp.xcode_emulation |
9 import os.path | 9 import os.path |
10 import re | 10 import re |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 | 827 |
828 def ComputeOutputFileName(self, spec, type=None): | 828 def ComputeOutputFileName(self, spec, type=None): |
829 """Compute the filename of the final output for the current target.""" | 829 """Compute the filename of the final output for the current target.""" |
830 if not type: | 830 if not type: |
831 type = spec['type'] | 831 type = spec['type'] |
832 | 832 |
833 # Compute filename prefix: the product prefix, or a default for | 833 # Compute filename prefix: the product prefix, or a default for |
834 # the product type. | 834 # the product type. |
835 if self.flavor == 'win': | 835 if self.flavor == 'win': |
836 DEFAULT_PREFIX = { | 836 DEFAULT_PREFIX = { |
| 837 'loadable_module': '', |
| 838 'shared_library': '', |
| 839 'static_library': '', |
| 840 } |
| 841 else: |
| 842 DEFAULT_PREFIX = { |
837 'loadable_module': 'lib', | 843 'loadable_module': 'lib', |
838 'shared_library': 'lib', | 844 'shared_library': 'lib', |
839 'static_library': 'lib', | 845 'static_library': 'lib', |
840 } | 846 } |
841 else: | |
842 DEFAULT_PREFIX = { | |
843 'loadable_module': '', | |
844 'shared_library': '', | |
845 'static_library': '', | |
846 } | |
847 prefix = spec.get('product_prefix', DEFAULT_PREFIX.get(type, '')) | 847 prefix = spec.get('product_prefix', DEFAULT_PREFIX.get(type, '')) |
848 | 848 |
849 # Compute filename extension: the product extension, or a default | 849 # Compute filename extension: the product extension, or a default |
850 # for the product type. | 850 # for the product type. |
851 if self.flavor == 'win': | 851 if self.flavor == 'win': |
852 DEFAULT_EXTENSION = { | 852 DEFAULT_EXTENSION = { |
853 'static_library': 'lib', | 853 'static_library': 'lib', |
854 'loadable_module': 'dll', | 854 'loadable_module': 'dll', |
855 'shared_library': 'dll', | 855 'shared_library': 'dll', |
856 'executable': 'exe', | 856 'executable': 'exe', |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 | 1255 |
1256 user_config = params.get('generator_flags', {}).get('config', None) | 1256 user_config = params.get('generator_flags', {}).get('config', None) |
1257 if user_config: | 1257 if user_config: |
1258 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1258 GenerateOutputForConfig(target_list, target_dicts, data, params, |
1259 user_config) | 1259 user_config) |
1260 else: | 1260 else: |
1261 config_names = target_dicts[target_list[0]]['configurations'].keys() | 1261 config_names = target_dicts[target_list[0]]['configurations'].keys() |
1262 for config_name in config_names: | 1262 for config_name in config_names: |
1263 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1263 GenerateOutputForConfig(target_list, target_dicts, data, params, |
1264 config_name) | 1264 config_name) |
OLD | NEW |