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 collections | 7 import collections |
8 import errno | 8 import errno |
9 import filecmp | 9 import filecmp |
10 import os.path | 10 import os.path |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 if 'flavor' in params: | 418 if 'flavor' in params: |
419 return params['flavor'] | 419 return params['flavor'] |
420 if sys.platform in flavors: | 420 if sys.platform in flavors: |
421 return flavors[sys.platform] | 421 return flavors[sys.platform] |
422 if sys.platform.startswith('sunos'): | 422 if sys.platform.startswith('sunos'): |
423 return 'solaris' | 423 return 'solaris' |
424 if sys.platform.startswith('freebsd'): | 424 if sys.platform.startswith('freebsd'): |
425 return 'freebsd' | 425 return 'freebsd' |
426 if sys.platform.startswith('openbsd'): | 426 if sys.platform.startswith('openbsd'): |
427 return 'openbsd' | 427 return 'openbsd' |
| 428 if sys.platform.startswith('netbsd'): |
| 429 return 'netbsd' |
428 if sys.platform.startswith('aix'): | 430 if sys.platform.startswith('aix'): |
429 return 'aix' | 431 return 'aix' |
430 | 432 |
431 return 'linux' | 433 return 'linux' |
432 | 434 |
433 | 435 |
434 def CopyTool(flavor, out_path): | 436 def CopyTool(flavor, out_path): |
435 """Finds (flock|mac|win)_tool.gyp in the gyp directory and copies it | 437 """Finds (flock|mac|win)_tool.gyp in the gyp directory and copies it |
436 to |out_path|.""" | 438 to |out_path|.""" |
437 # aix and solaris just need flock emulation. mac and win use more complicated | 439 # aix and solaris just need flock emulation. mac and win use more complicated |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 def CrossCompileRequested(): | 599 def CrossCompileRequested(): |
598 # TODO: figure out how to not build extra host objects in the | 600 # TODO: figure out how to not build extra host objects in the |
599 # non-cross-compile case when this is enabled, and enable unconditionally. | 601 # non-cross-compile case when this is enabled, and enable unconditionally. |
600 return (os.environ.get('GYP_CROSSCOMPILE') or | 602 return (os.environ.get('GYP_CROSSCOMPILE') or |
601 os.environ.get('AR_host') or | 603 os.environ.get('AR_host') or |
602 os.environ.get('CC_host') or | 604 os.environ.get('CC_host') or |
603 os.environ.get('CXX_host') or | 605 os.environ.get('CXX_host') or |
604 os.environ.get('AR_target') or | 606 os.environ.get('AR_target') or |
605 os.environ.get('CC_target') or | 607 os.environ.get('CC_target') or |
606 os.environ.get('CXX_target')) | 608 os.environ.get('CXX_target')) |
OLD | NEW |