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

Side by Side Diff: tools/utils.py

Issue 189413015: - Fix typo. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months 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 | no next file » | 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, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import os 9 import os
10 import platform 10 import platform
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) 231 return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper())
232 else: 232 else:
233 # Ask for a cross build if the host and target architectures don't match. 233 # Ask for a cross build if the host and target architectures don't match.
234 host_arch = ARCH_GUESS 234 host_arch = ARCH_GUESS
235 target_arch = arch 235 target_arch = arch
236 if target_arch == 'x64': 236 if target_arch == 'x64':
237 target_arch = 'ia32' 237 target_arch = 'ia32'
238 print "GetBuildConf: Rewritten %s to %s\n" % (arch, target_arch) 238 print "GetBuildConf: Rewritten %s to %s\n" % (arch, target_arch)
239 cross_build = '' 239 cross_build = ''
240 if host_arch != target_arch: 240 if host_arch != target_arch:
241 print "GetBuildConf: Cross-build of % on %s\n" % (arch, host_arch) 241 print "GetBuildConf: Cross-build of %s on %s\n" % (arch, host_arch)
242 cross_build = 'X' 242 cross_build = 'X'
243 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) 243 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper())
244 244
245 def GetBuildDir(host_os, target_os): 245 def GetBuildDir(host_os, target_os):
246 return BUILD_ROOT[host_os] 246 return BUILD_ROOT[host_os]
247 247
248 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): 248 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None):
249 build_root = GetBuildDir(host_os, target_os) 249 build_root = GetBuildDir(host_os, target_os)
250 if mode: 250 if mode:
251 build_root = os.path.join(build_root, GetBuildConf(mode, arch)) 251 build_root = os.path.join(build_root, GetBuildConf(mode, arch))
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 os.chdir(self._working_directory) 551 os.chdir(self._working_directory)
552 552
553 def __exit__(self, *_): 553 def __exit__(self, *_):
554 print "Enter directory = ", self._old_cwd 554 print "Enter directory = ", self._old_cwd
555 os.chdir(self._old_cwd) 555 os.chdir(self._old_cwd)
556 556
557 557
558 if __name__ == "__main__": 558 if __name__ == "__main__":
559 import sys 559 import sys
560 Main(sys.argv) 560 Main(sys.argv)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698