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 gyp | 6 import gyp |
7 import gyp.common | 7 import gyp.common |
8 import gyp.msvs_emulation | 8 import gyp.msvs_emulation |
9 import gyp.system_test | 9 import gyp.system_test |
10 import gyp.xcode_emulation | 10 import gyp.xcode_emulation |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 path = path.replace(PRODUCT_DIR, '.') | 207 path = path.replace(PRODUCT_DIR, '.') |
208 | 208 |
209 INTERMEDIATE_DIR = '$!INTERMEDIATE_DIR' | 209 INTERMEDIATE_DIR = '$!INTERMEDIATE_DIR' |
210 if INTERMEDIATE_DIR in path: | 210 if INTERMEDIATE_DIR in path: |
211 int_dir = self.GypPathToUniqueOutput('gen') | 211 int_dir = self.GypPathToUniqueOutput('gen') |
212 # GypPathToUniqueOutput generates a path relative to the product dir, | 212 # GypPathToUniqueOutput generates a path relative to the product dir, |
213 # so insert product_dir in front if it is provided. | 213 # so insert product_dir in front if it is provided. |
214 path = path.replace(INTERMEDIATE_DIR, | 214 path = path.replace(INTERMEDIATE_DIR, |
215 os.path.join(product_dir or '', int_dir)) | 215 os.path.join(product_dir or '', int_dir)) |
216 | 216 |
217 return os.path.normpath(path) | 217 return path |
218 | 218 |
219 def ExpandRuleVariables(self, path, root, dirname, source, ext, name): | 219 def ExpandRuleVariables(self, path, root, dirname, source, ext, name): |
220 path = path.replace(generator_default_variables['RULE_INPUT_ROOT'], root) | 220 path = path.replace(generator_default_variables['RULE_INPUT_ROOT'], root) |
221 path = path.replace(generator_default_variables['RULE_INPUT_DIRNAME'], | 221 path = path.replace(generator_default_variables['RULE_INPUT_DIRNAME'], |
222 dirname) | 222 dirname) |
223 path = path.replace(generator_default_variables['RULE_INPUT_PATH'], source) | 223 path = path.replace(generator_default_variables['RULE_INPUT_PATH'], source) |
224 path = path.replace(generator_default_variables['RULE_INPUT_EXT'], ext) | 224 path = path.replace(generator_default_variables['RULE_INPUT_EXT'], ext) |
225 path = path.replace(generator_default_variables['RULE_INPUT_NAME'], name) | 225 path = path.replace(generator_default_variables['RULE_INPUT_NAME'], name) |
226 return path | 226 return path |
227 | 227 |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 | 1252 |
1253 user_config = params.get('generator_flags', {}).get('config', None) | 1253 user_config = params.get('generator_flags', {}).get('config', None) |
1254 if user_config: | 1254 if user_config: |
1255 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1255 GenerateOutputForConfig(target_list, target_dicts, data, params, |
1256 user_config) | 1256 user_config) |
1257 else: | 1257 else: |
1258 config_names = target_dicts[target_list[0]]['configurations'].keys() | 1258 config_names = target_dicts[target_list[0]]['configurations'].keys() |
1259 for config_name in config_names: | 1259 for config_name in config_names: |
1260 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1260 GenerateOutputForConfig(target_list, target_dicts, data, params, |
1261 config_name) | 1261 config_name) |
OLD | NEW |