Chromium Code Reviews| 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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1123 AddHeaderToTarget(header, pbxp, xct, True) | 1123 AddHeaderToTarget(header, pbxp, xct, True) |
| 1124 | 1124 |
| 1125 # Add "copies". | 1125 # Add "copies". |
| 1126 pbxcp_dict = {} | 1126 pbxcp_dict = {} |
| 1127 for copy_group in spec.get('copies', []): | 1127 for copy_group in spec.get('copies', []): |
| 1128 dest = copy_group['destination'] | 1128 dest = copy_group['destination'] |
| 1129 if dest[0] not in ('/', '$'): | 1129 if dest[0] not in ('/', '$'): |
| 1130 # Relative paths are relative to $(SRCROOT). | 1130 # Relative paths are relative to $(SRCROOT). |
| 1131 dest = '$(SRCROOT)/' + dest | 1131 dest = '$(SRCROOT)/' + dest |
| 1132 | 1132 |
| 1133 code_sign = int(copy_group.get('code_sign', 0)) | |
|
Mark Mentovai
2015/02/26 21:35:13
I agree, please change this to xcode_code_sign and
| |
| 1134 settings = (None, '{ATTRIBUTES = (CodeSignOnCopy, ); }')[code_sign]; | |
| 1135 | |
| 1133 # Coalesce multiple "copies" sections in the same target with the same | 1136 # Coalesce multiple "copies" sections in the same target with the same |
| 1134 # "destination" property into the same PBXCopyFilesBuildPhase, otherwise | 1137 # "destination" property into the same PBXCopyFilesBuildPhase, otherwise |
| 1135 # they'll wind up with ID collisions. | 1138 # they'll wind up with ID collisions. |
| 1136 pbxcp = pbxcp_dict.get(dest, None) | 1139 pbxcp = pbxcp_dict.get(dest, None) |
| 1137 if pbxcp is None: | 1140 if pbxcp is None: |
| 1138 pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase({ | 1141 pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase({ |
| 1139 'name': 'Copy to ' + copy_group['destination'] | 1142 'name': 'Copy to ' + copy_group['destination'] |
| 1140 }, | 1143 }, |
| 1141 parent=xct) | 1144 parent=xct) |
| 1142 pbxcp.SetDestination(dest) | 1145 pbxcp.SetDestination(dest) |
| 1143 | 1146 |
| 1144 # TODO(mark): The usual comment about this knowing too much about | 1147 # TODO(mark): The usual comment about this knowing too much about |
| 1145 # gyp.xcodeproj_file internals applies. | 1148 # gyp.xcodeproj_file internals applies. |
| 1146 xct._properties['buildPhases'].insert(prebuild_index, pbxcp) | 1149 xct._properties['buildPhases'].insert(prebuild_index, pbxcp) |
| 1147 | 1150 |
| 1148 pbxcp_dict[dest] = pbxcp | 1151 pbxcp_dict[dest] = pbxcp |
| 1149 | 1152 |
| 1150 for file in copy_group['files']: | 1153 for file in copy_group['files']: |
| 1151 pbxcp.AddFile(file) | 1154 pbxcp.AddFile(file, settings) |
| 1152 | 1155 |
| 1153 # Excluded files can also go into the project file. | 1156 # Excluded files can also go into the project file. |
| 1154 if not skip_excluded_files: | 1157 if not skip_excluded_files: |
| 1155 for key in ['sources', 'mac_bundle_resources', 'mac_framework_headers', | 1158 for key in ['sources', 'mac_bundle_resources', 'mac_framework_headers', |
| 1156 'mac_framework_private_headers']: | 1159 'mac_framework_private_headers']: |
| 1157 excluded_key = key + '_excluded' | 1160 excluded_key = key + '_excluded' |
| 1158 for item in spec.get(excluded_key, []): | 1161 for item in spec.get(excluded_key, []): |
| 1159 pbxp.AddOrGetFileInRootGroup(item) | 1162 pbxp.AddOrGetFileInRootGroup(item) |
| 1160 | 1163 |
| 1161 # So can "inputs" and "outputs" sections of "actions" groups. | 1164 # So can "inputs" and "outputs" sections of "actions" groups. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1249 | 1252 |
| 1250 for build_file in build_files: | 1253 for build_file in build_files: |
| 1251 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) | 1254 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) |
| 1252 | 1255 |
| 1253 for build_file in build_files: | 1256 for build_file in build_files: |
| 1254 xcode_projects[build_file].Finalize2(xcode_targets, | 1257 xcode_projects[build_file].Finalize2(xcode_targets, |
| 1255 xcode_target_to_target_dict) | 1258 xcode_target_to_target_dict) |
| 1256 | 1259 |
| 1257 for build_file in build_files: | 1260 for build_file in build_files: |
| 1258 xcode_projects[build_file].Write() | 1261 xcode_projects[build_file].Write() |
| OLD | NEW |