summaryrefslogtreecommitdiffstats
path: root/common.py
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2011-02-24 19:49:37 -0800
committerVinson Lee <[email protected]>2011-02-24 19:49:37 -0800
commiteb1780238621c7be0342d9129eb639e4892c004d (patch)
treeff2e5bc4d6f94b9d86d9485815946aecbbf75670 /common.py
parentb2413de91682e3908d8ab1635956a290f603681c (diff)
scons: Reduce all Cygwin platform names to 'cygwin'.
platform.system in SCons on Cygwin includes the OS version number. Windows XP - CYGWIN_NT-5.1 Windows Vista - CYGWIN_NT-6.0 Windows 7 - CYGWIN_NT-6.1 Reduce all Cygwin platform variants to just 'cygwin' so anything downstream can simply use 'cygwin' instead of the different full platform names.
Diffstat (limited to 'common.py')
-rw-r--r--common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/common.py b/common.py
index b44f20e8216..1d0c6a71fa5 100644
--- a/common.py
+++ b/common.py
@@ -15,6 +15,8 @@ import SCons.Script.SConscript
# Defaults
host_platform = _platform.system().lower()
+if host_platform.startswith('cygwin'):
+ host_platform = 'cygwin'
# Search sys.argv[] for a "platform=foo" argument since we don't have
# an 'env' variable at this point.
@@ -81,7 +83,7 @@ def AddOptions(opts):
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', host_platform,
- allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin_nt-5.1', 'cygwin_nt-6.1', 'sunos5', 'freebsd8')))
+ allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos5', 'freebsd8')))
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no'))
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))