summaryrefslogtreecommitdiff
path: root/engine/SCons/Platform
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Platform')
-rw-r--r--engine/SCons/Platform/__init__.py4
-rw-r--r--engine/SCons/Platform/aix.py44
-rw-r--r--engine/SCons/Platform/cygwin.py4
-rw-r--r--engine/SCons/Platform/darwin.py4
-rw-r--r--engine/SCons/Platform/hpux.py4
-rw-r--r--engine/SCons/Platform/irix.py4
-rw-r--r--engine/SCons/Platform/os2.py4
-rw-r--r--engine/SCons/Platform/posix.py8
-rw-r--r--engine/SCons/Platform/sunos.py4
-rw-r--r--engine/SCons/Platform/win32.py4
10 files changed, 52 insertions, 32 deletions
diff --git a/engine/SCons/Platform/__init__.py b/engine/SCons/Platform/__init__.py
index 25ea93e..f8d8041 100644
--- a/engine/SCons/Platform/__init__.py
+++ b/engine/SCons/Platform/__init__.py
@@ -20,7 +20,7 @@ their own platform definition.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -42,7 +42,7 @@ their own platform definition.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/__init__.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/__init__.py 2014/07/05 09:42:21 garyo"
import SCons.compat
diff --git a/engine/SCons/Platform/aix.py b/engine/SCons/Platform/aix.py
index 98d4d8f..4d9ea92 100644
--- a/engine/SCons/Platform/aix.py
+++ b/engine/SCons/Platform/aix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,13 +30,17 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/aix.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/aix.py 2014/07/05 09:42:21 garyo"
import os
+import subprocess
import posix
-def get_xlc(env, xlc=None, xlc_r=None, packages=[]):
+import SCons.Util
+import SCons.Action
+
+def get_xlc(env, xlc=None, packages=[]):
# Use the AIX package installer tool lslpp to figure out where a
# given xl* compiler is installed and what version it is.
xlcPath = None
@@ -44,18 +48,30 @@ def get_xlc(env, xlc=None, xlc_r=None, packages=[]):
if xlc is None:
xlc = env.get('CC', 'xlc')
- if xlc_r is None:
- xlc_r = xlc + '_r'
+ if SCons.Util.is_List(xlc):
+ xlc = xlc[0]
for package in packages:
- cmd = "lslpp -fc " + package + " 2>/dev/null | egrep '" + xlc + "([^-_a-zA-Z0-9].*)?$'"
- line = os.popen(cmd).readline()
- if line:
- v, p = line.split(':')[1:3]
- xlcVersion = v.split()[1]
- xlcPath = p.split()[0]
- xlcPath = xlcPath[:xlcPath.rindex('/')]
- break
- return (xlcPath, xlc, xlc_r, xlcVersion)
+ # find the installed filename, which may be a symlink as well
+ pipe = SCons.Action._subproc(env, ['lslpp', '-fc', package],
+ stdin = 'devnull',
+ stderr = 'devnull',
+ stdout = subprocess.PIPE)
+ # output of lslpp is something like this:
+ # #Path:Fileset:File
+ # /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/exe/xlCcpp
+ # /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/bin/xlc_r -> /usr/vac/bin/xlc
+ for line in pipe.stdout:
+ if xlcPath:
+ continue # read everything to let lslpp terminate
+ fileset, filename = line.split(':')[1:3]
+ filename = filename.split()[0]
+ if ('/' in xlc and filename == xlc) \
+ or ('/' not in xlc and filename.endswith('/' + xlc)):
+ xlcVersion = fileset.split()[1]
+ xlcPath, sep, xlc = filename.rpartition('/')
+ pass
+ pass
+ return (xlcPath, xlc, xlcVersion)
def generate(env):
posix.generate(env)
diff --git a/engine/SCons/Platform/cygwin.py b/engine/SCons/Platform/cygwin.py
index 7429407..781f12d 100644
--- a/engine/SCons/Platform/cygwin.py
+++ b/engine/SCons/Platform/cygwin.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/cygwin.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/cygwin.py 2014/07/05 09:42:21 garyo"
import posix
from SCons.Platform import TempFileMunge
diff --git a/engine/SCons/Platform/darwin.py b/engine/SCons/Platform/darwin.py
index 3307839..bf61000 100644
--- a/engine/SCons/Platform/darwin.py
+++ b/engine/SCons/Platform/darwin.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/darwin.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/darwin.py 2014/07/05 09:42:21 garyo"
import posix
import os
diff --git a/engine/SCons/Platform/hpux.py b/engine/SCons/Platform/hpux.py
index 5c003ca..9e5fe6a 100644
--- a/engine/SCons/Platform/hpux.py
+++ b/engine/SCons/Platform/hpux.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/hpux.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/hpux.py 2014/07/05 09:42:21 garyo"
import posix
diff --git a/engine/SCons/Platform/irix.py b/engine/SCons/Platform/irix.py
index abb2a58..4287f97 100644
--- a/engine/SCons/Platform/irix.py
+++ b/engine/SCons/Platform/irix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/irix.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/irix.py 2014/07/05 09:42:21 garyo"
import posix
diff --git a/engine/SCons/Platform/os2.py b/engine/SCons/Platform/os2.py
index 83cd7ef..93b7b95 100644
--- a/engine/SCons/Platform/os2.py
+++ b/engine/SCons/Platform/os2.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/os2.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/os2.py 2014/07/05 09:42:21 garyo"
import win32
def generate(env):
diff --git a/engine/SCons/Platform/posix.py b/engine/SCons/Platform/posix.py
index 5deb2d0..eb4f6c9 100644
--- a/engine/SCons/Platform/posix.py
+++ b/engine/SCons/Platform/posix.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/posix.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/posix.py 2014/07/05 09:42:21 garyo"
import errno
import os
@@ -113,6 +113,10 @@ def generate(env):
# This platform supports RPATH specifications.
env['__RPATH'] = '$_RPATH'
+ # GDC is GCC family, but DMD and LDC have different options.
+ # Must be able to have GCC and DMD work in the same build, so:
+ env['__DRPATH'] = '$_DRPATH'
+
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
diff --git a/engine/SCons/Platform/sunos.py b/engine/SCons/Platform/sunos.py
index 911b97f..a9d3001 100644
--- a/engine/SCons/Platform/sunos.py
+++ b/engine/SCons/Platform/sunos.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/sunos.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/sunos.py 2014/07/05 09:42:21 garyo"
import posix
diff --git a/engine/SCons/Platform/win32.py b/engine/SCons/Platform/win32.py
index b7b65e1..6511f12 100644
--- a/engine/SCons/Platform/win32.py
+++ b/engine/SCons/Platform/win32.py
@@ -8,7 +8,7 @@ selection method.
"""
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/win32.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/win32.py 2014/07/05 09:42:21 garyo"
import os
import os.path