| 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 filecmp | 5 import filecmp |
| 6 import gyp.common | 6 import gyp.common |
| 7 import gyp.xcodeproj_file | 7 import gyp.xcodeproj_file |
| 8 import gyp.xcode_ninja | 8 import gyp.xcode_ninja |
| 9 import errno | 9 import errno |
| 10 import os | 10 import os |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 xct.ResourcesPhase().AddFile(resource) | 515 xct.ResourcesPhase().AddFile(resource) |
| 516 | 516 |
| 517 | 517 |
| 518 def AddHeaderToTarget(header, pbxp, xct, is_public): | 518 def AddHeaderToTarget(header, pbxp, xct, is_public): |
| 519 # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call | 519 # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call |
| 520 # where it's used. | 520 # where it's used. |
| 521 settings = '{ATTRIBUTES = (%s, ); }' % ('Private', 'Public')[is_public] | 521 settings = '{ATTRIBUTES = (%s, ); }' % ('Private', 'Public')[is_public] |
| 522 xct.HeadersPhase().AddFile(header, settings) | 522 xct.HeadersPhase().AddFile(header, settings) |
| 523 | 523 |
| 524 | 524 |
| 525 _xcode_variable_re = re.compile('(\$\((.*?)\))') | 525 _xcode_variable_re = re.compile(r'(\$\((.*?)\))') |
| 526 def ExpandXcodeVariables(string, expansions): | 526 def ExpandXcodeVariables(string, expansions): |
| 527 """Expands Xcode-style $(VARIABLES) in string per the expansions dict. | 527 """Expands Xcode-style $(VARIABLES) in string per the expansions dict. |
| 528 | 528 |
| 529 In some rare cases, it is appropriate to expand Xcode variables when a | 529 In some rare cases, it is appropriate to expand Xcode variables when a |
| 530 project file is generated. For any substring $(VAR) in string, if VAR is a | 530 project file is generated. For any substring $(VAR) in string, if VAR is a |
| 531 key in the expansions dict, $(VAR) will be replaced with expansions[VAR]. | 531 key in the expansions dict, $(VAR) will be replaced with expansions[VAR]. |
| 532 Any $(VAR) substring in string for which VAR is not a key in the expansions | 532 Any $(VAR) substring in string for which VAR is not a key in the expansions |
| 533 dict will remain in the returned string. | 533 dict will remain in the returned string. |
| 534 """ | 534 """ |
| 535 | 535 |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 | 1234 |
| 1235 for build_file in build_files: | 1235 for build_file in build_files: |
| 1236 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) | 1236 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) |
| 1237 | 1237 |
| 1238 for build_file in build_files: | 1238 for build_file in build_files: |
| 1239 xcode_projects[build_file].Finalize2(xcode_targets, | 1239 xcode_projects[build_file].Finalize2(xcode_targets, |
| 1240 xcode_target_to_target_dict) | 1240 xcode_target_to_target_dict) |
| 1241 | 1241 |
| 1242 for build_file in build_files: | 1242 for build_file in build_files: |
| 1243 xcode_projects[build_file].Write() | 1243 xcode_projects[build_file].Write() |
| OLD | NEW |