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 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
363 def GetHostOSFlavor(): | |
Torne
2012/08/01 11:20:32
Probably better called GetHostFlavor() (and the va
| |
364 """Returns | GetFlavor default avoiding override of params.flavor """ | |
365 return GetFlavor({}) | |
Torne
2012/08/01 11:20:32
There probably needs to be a way to set this in pa
| |
363 | 366 |
364 def CopyTool(flavor, out_path): | 367 def CopyTool(flavor, out_path): |
365 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it | 368 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it |
366 to |out_path|.""" | 369 to |out_path|.""" |
367 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) | 370 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) |
368 if not prefix: | 371 if not prefix: |
369 return | 372 return |
370 | 373 |
371 # Slurp input file. | 374 # Slurp input file. |
372 source_path = os.path.join( | 375 source_path = os.path.join( |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
443 return | 446 return |
444 visited.add(node) | 447 visited.add(node) |
445 visiting.add(node) | 448 visiting.add(node) |
446 for neighbor in get_edges(node): | 449 for neighbor in get_edges(node): |
447 Visit(neighbor) | 450 Visit(neighbor) |
448 visiting.remove(node) | 451 visiting.remove(node) |
449 ordered_nodes.insert(0, node) | 452 ordered_nodes.insert(0, node) |
450 for node in sorted(graph): | 453 for node in sorted(graph): |
451 Visit(node) | 454 Visit(node) |
452 return ordered_nodes | 455 return ordered_nodes |
OLD | NEW |