summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Platform
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-26 16:31:31 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-26 16:31:31 +0200
commitdf608fa858819f84924451b6a97559671303e8b0 (patch)
tree931f0ae1302ff7d45e41a1aa4b6dbc96be174744 /src/engine/SCons/Platform
parent9d8eae9f5bf53a4a80e29d7a3a1d2c7d7197688a (diff)
parent78989ebb445af2c6462ae2bf05ffd588d76610e4 (diff)
Merge tag 'upstream/2.3.2'
Upstream version 2.3.2
Diffstat (limited to 'src/engine/SCons/Platform')
-rw-r--r--src/engine/SCons/Platform/PlatformTests.py9
-rw-r--r--src/engine/SCons/Platform/__init__.py4
-rw-r--r--src/engine/SCons/Platform/__init__.xml6
-rw-r--r--src/engine/SCons/Platform/aix.py44
-rw-r--r--src/engine/SCons/Platform/cygwin.py4
-rw-r--r--src/engine/SCons/Platform/darwin.py4
-rw-r--r--src/engine/SCons/Platform/hpux.py4
-rw-r--r--src/engine/SCons/Platform/irix.py4
-rw-r--r--src/engine/SCons/Platform/os2.py4
-rw-r--r--src/engine/SCons/Platform/posix.py8
-rw-r--r--src/engine/SCons/Platform/posix.xml6
-rw-r--r--src/engine/SCons/Platform/sunos.py4
-rw-r--r--src/engine/SCons/Platform/sunos.xml6
-rw-r--r--src/engine/SCons/Platform/win32.py4
-rw-r--r--src/engine/SCons/Platform/win32.xml6
15 files changed, 69 insertions, 48 deletions
diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py
index 093b804..94a697b 100644
--- a/src/engine/SCons/Platform/PlatformTests.py
+++ b/src/engine/SCons/Platform/PlatformTests.py
@@ -1,5 +1,5 @@
#
-# 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
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Platform/PlatformTests.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Platform/PlatformTests.py 2014/07/05 09:42:21 garyo"
import SCons.compat
@@ -29,6 +29,8 @@ import collections
import sys
import unittest
+import TestUnit
+
import SCons.Errors
import SCons.Platform
@@ -118,8 +120,7 @@ class PlatformTestCase(unittest.TestCase):
if __name__ == "__main__":
suite = unittest.makeSuite(PlatformTestCase, 'test_')
- if not unittest.TextTestRunner().run(suite).wasSuccessful():
- sys.exit(1)
+ TestUnit.run(suite)
# Local Variables:
# tab-width:4
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py
index 25ea93e..f8d8041 100644
--- a/src/engine/SCons/Platform/__init__.py
+++ b/src/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/src/engine/SCons/Platform/__init__.xml b/src/engine/SCons/Platform/__init__.xml
index f80cefb..d3cce6c 100644
--- a/src/engine/SCons/Platform/__init__.xml
+++ b/src/engine/SCons/Platform/__init__.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -21,7 +21,7 @@ See its __doc__ string for a discussion of the format.
<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd">
+ xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
<cvar name="ESCAPE">
<summary>
@@ -241,4 +241,4 @@ or '-via' for ARM toolchain.
</summary>
</cvar>
-</sconsdoc> \ No newline at end of file
+</sconsdoc>
diff --git a/src/engine/SCons/Platform/aix.py b/src/engine/SCons/Platform/aix.py
index 98d4d8f..4d9ea92 100644
--- a/src/engine/SCons/Platform/aix.py
+++ b/src/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/src/engine/SCons/Platform/cygwin.py b/src/engine/SCons/Platform/cygwin.py
index 7429407..781f12d 100644
--- a/src/engine/SCons/Platform/cygwin.py
+++ b/src/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/src/engine/SCons/Platform/darwin.py b/src/engine/SCons/Platform/darwin.py
index 3307839..bf61000 100644
--- a/src/engine/SCons/Platform/darwin.py
+++ b/src/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/src/engine/SCons/Platform/hpux.py b/src/engine/SCons/Platform/hpux.py
index 5c003ca..9e5fe6a 100644
--- a/src/engine/SCons/Platform/hpux.py
+++ b/src/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/src/engine/SCons/Platform/irix.py b/src/engine/SCons/Platform/irix.py
index abb2a58..4287f97 100644
--- a/src/engine/SCons/Platform/irix.py
+++ b/src/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/src/engine/SCons/Platform/os2.py b/src/engine/SCons/Platform/os2.py
index 83cd7ef..93b7b95 100644
--- a/src/engine/SCons/Platform/os2.py
+++ b/src/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/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py
index 5deb2d0..eb4f6c9 100644
--- a/src/engine/SCons/Platform/posix.py
+++ b/src/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/src/engine/SCons/Platform/posix.xml b/src/engine/SCons/Platform/posix.xml
index be67d87..9d3771f 100644
--- a/src/engine/SCons/Platform/posix.xml
+++ b/src/engine/SCons/Platform/posix.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -21,7 +21,7 @@ See its __doc__ string for a discussion of the format.
<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd">
+ xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
<cvar name="RPATH">
<summary>
@@ -77,4 +77,4 @@ when the &cv-_RPATH; variable is automatically generated.
</summary>
</cvar>
-</sconsdoc> \ No newline at end of file
+</sconsdoc>
diff --git a/src/engine/SCons/Platform/sunos.py b/src/engine/SCons/Platform/sunos.py
index 911b97f..a9d3001 100644
--- a/src/engine/SCons/Platform/sunos.py
+++ b/src/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/src/engine/SCons/Platform/sunos.xml b/src/engine/SCons/Platform/sunos.xml
index a2a8f38..d6d978c 100644
--- a/src/engine/SCons/Platform/sunos.xml
+++ b/src/engine/SCons/Platform/sunos.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -21,7 +21,7 @@ See its __doc__ string for a discussion of the format.
<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd">
+ xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
<cvar name="PKGCHK">
@@ -52,4 +52,4 @@ The default is
</summary>
</cvar>
-</sconsdoc> \ No newline at end of file
+</sconsdoc>
diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py
index b7b65e1..6511f12 100644
--- a/src/engine/SCons/Platform/win32.py
+++ b/src/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
diff --git a/src/engine/SCons/Platform/win32.xml b/src/engine/SCons/Platform/win32.xml
index cf1c746..75ae3df 100644
--- a/src/engine/SCons/Platform/win32.xml
+++ b/src/engine/SCons/Platform/win32.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-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
This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
@@ -21,7 +21,7 @@ See its __doc__ string for a discussion of the format.
<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd">
+ xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
<cvar name="MAXLINELENGTH">
<summary>
@@ -34,4 +34,4 @@ are linked via a temporary file name.
</summary>
</cvar>
-</sconsdoc> \ No newline at end of file
+</sconsdoc>