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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 | 386 |
387 if 'flavor' in params: | 387 if 'flavor' in params: |
388 return params['flavor'] | 388 return params['flavor'] |
389 if sys.platform in flavors: | 389 if sys.platform in flavors: |
390 return flavors[sys.platform] | 390 return flavors[sys.platform] |
391 if sys.platform.startswith('sunos'): | 391 if sys.platform.startswith('sunos'): |
392 return 'solaris' | 392 return 'solaris' |
393 if sys.platform.startswith('freebsd'): | 393 if sys.platform.startswith('freebsd'): |
394 return 'freebsd' | 394 return 'freebsd' |
| 395 if sys.platform.startswith('openbsd'): |
| 396 return 'openbsd' |
395 if sys.platform.startswith('aix'): | 397 if sys.platform.startswith('aix'): |
396 return 'aix' | 398 return 'aix' |
397 | 399 |
398 return 'linux' | 400 return 'linux' |
399 | 401 |
400 | 402 |
401 def CopyTool(flavor, out_path): | 403 def CopyTool(flavor, out_path): |
402 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it | 404 """Finds (mac|sun|win)_tool.gyp in the gyp directory and copies it |
403 to |out_path|.""" | 405 to |out_path|.""" |
404 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) | 406 prefix = { 'solaris': 'sun', 'mac': 'mac', 'win': 'win' }.get(flavor, None) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 return | 482 return |
481 visited.add(node) | 483 visited.add(node) |
482 visiting.add(node) | 484 visiting.add(node) |
483 for neighbor in get_edges(node): | 485 for neighbor in get_edges(node): |
484 Visit(neighbor) | 486 Visit(neighbor) |
485 visiting.remove(node) | 487 visiting.remove(node) |
486 ordered_nodes.insert(0, node) | 488 ordered_nodes.insert(0, node) |
487 for node in sorted(graph): | 489 for node in sorted(graph): |
488 Visit(node) | 490 Visit(node) |
489 return ordered_nodes | 491 return ordered_nodes |
OLD | NEW |