| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 | 372 |
| 373 if 'flavor' in params: | 373 if 'flavor' in params: |
| 374 return params['flavor'] | 374 return params['flavor'] |
| 375 if sys.platform in flavors: | 375 if sys.platform in flavors: |
| 376 return flavors[sys.platform] | 376 return flavors[sys.platform] |
| 377 if sys.platform.startswith('sunos'): | 377 if sys.platform.startswith('sunos'): |
| 378 return 'solaris' | 378 return 'solaris' |
| 379 if sys.platform.startswith('freebsd'): | 379 if sys.platform.startswith('freebsd'): |
| 380 return 'freebsd' | 380 return 'freebsd' |
| 381 if sys.platform.startswith('dragonfly'): |
| 382 return 'dragonflybsd' |
| 381 | 383 |
| 382 return 'linux' | 384 return 'linux' |
| 383 | 385 |
| 384 | 386 |
| 385 def CopyTool(flavor, out_path): | 387 def CopyTool(flavor, out_path): |
| 386 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it | 388 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it |
| 387 to |out_path|.""" | 389 to |out_path|.""" |
| 388 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) | 390 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) |
| 389 if not prefix: | 391 if not prefix: |
| 390 return | 392 return |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 return | 466 return |
| 465 visited.add(node) | 467 visited.add(node) |
| 466 visiting.add(node) | 468 visiting.add(node) |
| 467 for neighbor in get_edges(node): | 469 for neighbor in get_edges(node): |
| 468 Visit(neighbor) | 470 Visit(neighbor) |
| 469 visiting.remove(node) | 471 visiting.remove(node) |
| 470 ordered_nodes.insert(0, node) | 472 ordered_nodes.insert(0, node) |
| 471 for node in sorted(graph): | 473 for node in sorted(graph): |
| 472 Visit(node) | 474 Visit(node) |
| 473 return ordered_nodes | 475 return ordered_nodes |
| OLD | NEW |