Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: pylib/gyp/generator/xcode.py

Issue 748793002: Fixed Gyp Xcode generator for libraries with identical names. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pylib/gyp/xcodeproj_file.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 class XcodeProject(object): 107 class XcodeProject(object):
108 def __init__(self, gyp_path, path, build_file_dict): 108 def __init__(self, gyp_path, path, build_file_dict):
109 self.gyp_path = gyp_path 109 self.gyp_path = gyp_path
110 self.path = path 110 self.path = path
111 self.project = gyp.xcodeproj_file.PBXProject(path=path) 111 self.project = gyp.xcodeproj_file.PBXProject(path=path)
112 projectDirPath = gyp.common.RelativePath( 112 projectDirPath = gyp.common.RelativePath(
113 os.path.dirname(os.path.abspath(self.gyp_path)), 113 os.path.dirname(os.path.abspath(self.gyp_path)),
114 os.path.dirname(path) or '.') 114 os.path.dirname(path) or '.')
115 self.project.SetProperty('projectDirPath', projectDirPath) 115 self.project.SetProperty('projectDirPath', projectDirPath)
116 if 'xcode_settings' in build_file_dict:
117 xcs = build_file_dict['xcode_settings']
118 # Only avoid add projectRoot to avoid hash collision, if both SYMROOT
Mark Mentovai 2014/11/25 15:59:31 I don’t really understand this comment.
119 # and CONFIGURATION_BUILD_DIR are set. Otherwise ignore everything.
120 if 'SYMROOT' in xcs and 'CONFIGURATION_BUILD_DIR' in xcs:
Mark Mentovai 2014/11/25 15:59:31 I also don’t know how or why you’ve chosen this co
121 self.project.SetProperty('projectRoot', os.path.dirname(path))
Mark Mentovai 2014/11/25 15:59:31 What is path here? Absolute or relative?
Mark Mentovai 2014/11/25 15:59:31 Is projectRoot a real thing that Xcode ever sets?
122 elif 'SYMROOT' not in xcs and 'CONFIGURATION_BUILD_DIR' not in xcs:
123 pass
124 else:
125 sys.stderr.write("Warning: Only one of 'SYMROOT' and \
126 'CONFIGURATION_BUILD_DIR' defined in %s. Either define both or none" %
Mark Mentovai 2014/11/25 15:59:31 Where does this requirement come from?
127 gyp_path)
128 pass
Mark Mentovai 2014/11/25 15:59:31 Not needed since you already have the (questionabl
116 self.project_file = \ 129 self.project_file = \
117 gyp.xcodeproj_file.XCProjectFile({'rootObject': self.project}) 130 gyp.xcodeproj_file.XCProjectFile({'rootObject': self.project})
118 self.build_file_dict = build_file_dict 131 self.build_file_dict = build_file_dict
119 132
120 # TODO(mark): add destructor that cleans up self.path if created_dir is 133 # TODO(mark): add destructor that cleans up self.path if created_dir is
121 # True and things didn't complete successfully. Or do something even 134 # True and things didn't complete successfully. Or do something even
122 # better with "try"? 135 # better with "try"?
123 self.created_dir = False 136 self.created_dir = False
124 try: 137 try:
125 os.makedirs(self.path) 138 os.makedirs(self.path)
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 1247
1235 for build_file in build_files: 1248 for build_file in build_files:
1236 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) 1249 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
1237 1250
1238 for build_file in build_files: 1251 for build_file in build_files:
1239 xcode_projects[build_file].Finalize2(xcode_targets, 1252 xcode_projects[build_file].Finalize2(xcode_targets,
1240 xcode_target_to_target_dict) 1253 xcode_target_to_target_dict)
1241 1254
1242 for build_file in build_files: 1255 for build_file in build_files:
1243 xcode_projects[build_file].Write() 1256 xcode_projects[build_file].Write()
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/xcodeproj_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698