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

Side by Side Diff: pylib/gyp/common.py

Issue 10795044: Support Mac android cross compile. Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 4 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
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 from __future__ import with_statement 5 from __future__ import with_statement
6 6
7 import errno 7 import errno
8 import filecmp 8 import filecmp
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 'cygwin': 'win', 352 'cygwin': 'win',
353 'win32': 'win', 353 'win32': 'win',
354 'darwin': 'mac', 354 'darwin': 'mac',
355 'sunos5': 'solaris', 355 'sunos5': 'solaris',
356 'freebsd7': 'freebsd', 356 'freebsd7': 'freebsd',
357 'freebsd8': 'freebsd', 357 'freebsd8': 'freebsd',
358 'freebsd9': 'freebsd', 358 'freebsd9': 'freebsd',
359 } 359 }
360 flavor = flavors.get(sys.platform, 'linux') 360 flavor = flavors.get(sys.platform, 'linux')
361 return params.get('flavor', flavor) 361 return params.get('flavor', flavor)
362 362
Torne 2012/08/21 09:47:17 Two blank lines between top level definitions (abo
363 def GetHostFlavor(params):
364 """Returns |params.options.host_flavor| if it's set, the system's default
365 flavor else."""
366 options = params.get('options')
367 if options.host_flavor:
368 host_flavor = options.host_flavor
369 else:
370 host_flavor = GetFlavor({})
371 return host_flavor;
363 372
364 def CopyTool(flavor, out_path): 373 def CopyTool(flavor, out_path):
365 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it 374 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it
366 to |out_path|.""" 375 to |out_path|."""
367 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) 376 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None)
368 if not prefix: 377 if not prefix:
369 return 378 return
370 379
371 # Slurp input file. 380 # Slurp input file.
372 source_path = os.path.join( 381 source_path = os.path.join(
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 return 452 return
444 visited.add(node) 453 visited.add(node)
445 visiting.add(node) 454 visiting.add(node)
446 for neighbor in get_edges(node): 455 for neighbor in get_edges(node):
447 Visit(neighbor) 456 Visit(neighbor)
448 visiting.remove(node) 457 visiting.remove(node)
449 ordered_nodes.insert(0, node) 458 ordered_nodes.insert(0, node)
450 for node in sorted(graph): 459 for node in sorted(graph):
451 Visit(node) 460 Visit(node)
452 return ordered_nodes 461 return ordered_nodes
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698