diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-24 03:45:32 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-24 03:45:32 (GMT) |
commit | db7e2b9bef087394fd3ce603e75231dec7f2eca4 (patch) | |
tree | 59fe8e23d14566ca5776d7ad108e95208ed17344 /src/engine/SCons/Platform | |
parent | 9587e1d2dad1c532d86f664f5cbd6266ebd77808 (diff) | |
download | SCons-db7e2b9bef087394fd3ce603e75231dec7f2eca4.zip SCons-db7e2b9bef087394fd3ce603e75231dec7f2eca4.tar.gz SCons-db7e2b9bef087394fd3ce603e75231dec7f2eca4.tar.bz2 |
Implement tool chains for AIX, SunOS, and HP-UX. (Steve Leblanc)
Diffstat (limited to 'src/engine/SCons/Platform')
-rw-r--r-- | src/engine/SCons/Platform/PlatformTests.py | 24 | ||||
-rw-r--r-- | src/engine/SCons/Platform/__init__.py | 6 | ||||
-rw-r--r-- | src/engine/SCons/Platform/aix.py | 38 | ||||
-rw-r--r-- | src/engine/SCons/Platform/hpux.py | 38 | ||||
-rw-r--r-- | src/engine/SCons/Platform/sunos.py | 38 |
5 files changed, 144 insertions, 0 deletions
diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py index 63152f0..bbfdd92 100644 --- a/src/engine/SCons/Platform/PlatformTests.py +++ b/src/engine/SCons/Platform/PlatformTests.py @@ -68,6 +68,30 @@ class PlatformTestCase(unittest.TestCase): assert env['LIBSUFFIX'] == '.a', env assert env['SHELL'] == 'sh', env + p = SCons.Platform.Platform('aix') + assert str(p) == 'aix', p + env = Environment() + p(env) + assert env['PROGSUFFIX'] == '', env + assert env['LIBSUFFIX'] == '.a', env + assert env['SHELL'] == 'sh', env + + p = SCons.Platform.Platform('sunos') + assert str(p) == 'sunos', p + env = Environment() + p(env) + assert env['PROGSUFFIX'] == '', env + assert env['LIBSUFFIX'] == '.a', env + assert env['SHELL'] == 'sh', env + + p = SCons.Platform.Platform('hpux') + assert str(p) == 'hpux', p + env = Environment() + p(env) + assert env['PROGSUFFIX'] == '', env + assert env['LIBSUFFIX'] == '.a', env + assert env['SHELL'] == 'sh', env + p = SCons.Platform.Platform('win32') assert str(p) == 'win32', p env = Environment() diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py index 565c2a0..84fe208 100644 --- a/src/engine/SCons/Platform/__init__.py +++ b/src/engine/SCons/Platform/__init__.py @@ -66,6 +66,12 @@ def platform_default(): return 'cygwin' elif string.find(sys.platform, 'irix') != -1: return 'irix' + elif string.find(sys.platform, 'sunos') != -1: + return 'sunos' + elif string.find(sys.platform, 'hp-ux') != -1: + return 'hpux' + elif string.find(sys.platform, 'aix') != -1: + return 'aix' else: return 'posix' elif os.name == 'os2': diff --git a/src/engine/SCons/Platform/aix.py b/src/engine/SCons/Platform/aix.py new file mode 100644 index 0000000..542f548 --- /dev/null +++ b/src/engine/SCons/Platform/aix.py @@ -0,0 +1,38 @@ +"""engine.SCons.Platform.aix + +Platform-specific initialization for IBM AIX systems. + +There normally shouldn't be any need to import this module directly. It +will usually be imported through the generic SCons.Platform.Platform() +selection method. +""" + +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import posix + +def generate(env): + posix.generate(env) diff --git a/src/engine/SCons/Platform/hpux.py b/src/engine/SCons/Platform/hpux.py new file mode 100644 index 0000000..9b3a6bb --- /dev/null +++ b/src/engine/SCons/Platform/hpux.py @@ -0,0 +1,38 @@ +"""engine.SCons.Platform.hpux + +Platform-specific initialization for HP-UX systems. + +There normally shouldn't be any need to import this module directly. It +will usually be imported through the generic SCons.Platform.Platform() +selection method. +""" + +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import posix + +def generate(env): + posix.generate(env) diff --git a/src/engine/SCons/Platform/sunos.py b/src/engine/SCons/Platform/sunos.py new file mode 100644 index 0000000..6b37dd6 --- /dev/null +++ b/src/engine/SCons/Platform/sunos.py @@ -0,0 +1,38 @@ +"""engine.SCons.Platform.sunos + +Platform-specific initialization for Sun systems. + +There normally shouldn't be any need to import this module directly. It +will usually be imported through the generic SCons.Platform.Platform() +selection method. +""" + +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import posix + +def generate(env): + posix.generate(env) |