diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2014-04-26 11:52:25 +0200 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2014-04-26 11:52:25 +0200 |
commit | 599d55e3999ad29f72fdc3a61d7c4bafc3171452 (patch) | |
tree | 9192ad293f1b2bb4d8b57a45660b5f2da69700df /engine/SCons/Tool | |
parent | cc58c8587a4e67f389b00e5d3278fae049ac7399 (diff) |
Imported Upstream version 2.3.1upstream/2.3.1
Diffstat (limited to 'engine/SCons/Tool')
123 files changed, 1382 insertions, 290 deletions
diff --git a/engine/SCons/Tool/386asm.py b/engine/SCons/Tool/386asm.py index 2b26c0f..0d96b3d 100644 --- a/engine/SCons/Tool/386asm.py +++ b/engine/SCons/Tool/386asm.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/386asm.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/386asm.py 2014/03/02 14:18:15 garyo" from SCons.Tool.PharLapCommon import addPharLapPaths import SCons.Util diff --git a/engine/SCons/Tool/BitKeeper.py b/engine/SCons/Tool/BitKeeper.py index 288ef90..f99054c 100644 --- a/engine/SCons/Tool/BitKeeper.py +++ b/engine/SCons/Tool/BitKeeper.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/BitKeeper.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/BitKeeper.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/CVS.py b/engine/SCons/Tool/CVS.py index 3e60643..035ee63 100644 --- a/engine/SCons/Tool/CVS.py +++ b/engine/SCons/Tool/CVS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -29,7 +29,7 @@ selection method. # 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__ = "src/engine/SCons/Tool/CVS.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/CVS.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/FortranCommon.py b/engine/SCons/Tool/FortranCommon.py index 7b470a2..bd211ef 100644 --- a/engine/SCons/Tool/FortranCommon.py +++ b/engine/SCons/Tool/FortranCommon.py @@ -5,7 +5,7 @@ Stuff for processing Fortran, common to all fortran dialects. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ Stuff for processing Fortran, common to all fortran dialects. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/FortranCommon.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/FortranCommon.py 2014/03/02 14:18:15 garyo" import re import os.path diff --git a/engine/SCons/Tool/GettextCommon.py b/engine/SCons/Tool/GettextCommon.py index 2b1b925..db8d950 100644 --- a/engine/SCons/Tool/GettextCommon.py +++ b/engine/SCons/Tool/GettextCommon.py @@ -3,7 +3,7 @@ Used by several tools of `gettext` toolset. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -24,7 +24,7 @@ Used by several tools of `gettext` toolset. # 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__ = "src/engine/SCons/Tool/GettextCommon.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/GettextCommon.py 2014/03/02 14:18:15 garyo" import SCons.Warnings import re diff --git a/engine/SCons/Tool/JavaCommon.py b/engine/SCons/Tool/JavaCommon.py index ea5e5bd..8e5473d 100644 --- a/engine/SCons/Tool/JavaCommon.py +++ b/engine/SCons/Tool/JavaCommon.py @@ -5,7 +5,7 @@ Stuff for processing Java. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ Stuff for processing Java. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/JavaCommon.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/JavaCommon.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/MSCommon/__init__.py b/engine/SCons/Tool/MSCommon/__init__.py index 3722663..6efdcce 100644 --- a/engine/SCons/Tool/MSCommon/__init__.py +++ b/engine/SCons/Tool/MSCommon/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/MSCommon/__init__.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 2014/03/02 14:18:15 garyo" __doc__ = """ Common functions for Microsoft Visual Studio and Visual C/C++. diff --git a/engine/SCons/Tool/MSCommon/arch.py b/engine/SCons/Tool/MSCommon/arch.py index e6eb382..3fc4eed 100644 --- a/engine/SCons/Tool/MSCommon/arch.py +++ b/engine/SCons/Tool/MSCommon/arch.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/MSCommon/arch.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 2014/03/02 14:18:15 garyo" __doc__ = """Module to define supported Windows chip architectures. """ diff --git a/engine/SCons/Tool/MSCommon/common.py b/engine/SCons/Tool/MSCommon/common.py index e3fda5a..006e17e 100644 --- a/engine/SCons/Tool/MSCommon/common.py +++ b/engine/SCons/Tool/MSCommon/common.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/MSCommon/common.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 2014/03/02 14:18:15 garyo" __doc__ = """ Common helper functions for working with the Microsoft tool chain. @@ -55,12 +55,12 @@ _is_win64 = None def is_win64(): """Return true if running on windows 64 bits. - + Works whether python itself runs in 64 bits or 32 bits.""" # Unfortunately, python does not provide a useful way to determine # if the underlying Windows OS is 32-bit or 64-bit. Worse, whether # the Python itself is 32-bit or 64-bit affects what it returns, - # so nothing in sys.* or os.* help. + # so nothing in sys.* or os.* help. # Apparently the best solution is to use env vars that Windows # sets. If PROCESSOR_ARCHITECTURE is not x86, then the python @@ -120,11 +120,21 @@ def normalize_env(env, keys, force=False): if k in os.environ and (force or not k in normenv): normenv[k] = os.environ[k].encode('mbcs') + # This shouldn't be necessary, since the default environment should include system32, + # but keep this here to be safe, since it's needed to find reg.exe which the MSVC + # bat scripts use. + sys32_dir = os.path.join(os.environ.get("SystemRoot", os.environ.get("windir",r"C:\Windows\system32")),"System32") + + if sys32_dir not in normenv['PATH']: + normenv['PATH'] = normenv['PATH'] + os.pathsep + sys32_dir + + debug("PATH: %s"%normenv['PATH']) + return normenv def get_output(vcbat, args = None, env = None): """Parse the output of given bat file, with given args.""" - + if env is None: # Create a blank environment, for use in launching the tools env = SCons.Environment.Environment(tools=[]) @@ -136,6 +146,9 @@ def get_output(vcbat, args = None, env = None): # settings in vs.py. vars = [ 'COMSPEC', +# VS100 and VS110: Still set, but modern MSVC setup scripts will +# discard these if registry has values. However Intel compiler setup +# script still requires these as of 2013/2014. 'VS110COMNTOOLS', 'VS100COMNTOOLS', 'VS90COMNTOOLS', @@ -166,6 +179,11 @@ def get_output(vcbat, args = None, env = None): # and won't work under Pythons not built with threading. stdout = popen.stdout.read() stderr = popen.stderr.read() + + # Extra debug logic, uncomment if necessar +# debug('get_output():stdout:%s'%stdout) +# debug('get_output():stderr:%s'%stderr) + if stderr: # TODO: find something better to do with stderr; # this at least prevents errors from getting swallowed. @@ -196,7 +214,7 @@ def parse_output(output, keep = ("INCLUDE", "LIB", "LIBPATH", "PATH")): p = p.encode('mbcs') # XXX: For some reason, VC98 .bat file adds "" around the PATH # values, and it screws up the environment later, so we strip - # it. + # it. p = p.strip('"') dkeep[key].append(p) diff --git a/engine/SCons/Tool/MSCommon/netframework.py b/engine/SCons/Tool/MSCommon/netframework.py index e1c12a6..fef75eb 100644 --- a/engine/SCons/Tool/MSCommon/netframework.py +++ b/engine/SCons/Tool/MSCommon/netframework.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -20,7 +20,7 @@ # 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__ = "src/engine/SCons/Tool/MSCommon/netframework.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 2014/03/02 14:18:15 garyo" __doc__ = """ """ diff --git a/engine/SCons/Tool/MSCommon/sdk.py b/engine/SCons/Tool/MSCommon/sdk.py index 1536a22..320ef4c 100644 --- a/engine/SCons/Tool/MSCommon/sdk.py +++ b/engine/SCons/Tool/MSCommon/sdk.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/MSCommon/sdk.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 2014/03/02 14:18:15 garyo" __doc__ = """Module to detect the Platform/Windows SDK diff --git a/engine/SCons/Tool/MSCommon/vc.py b/engine/SCons/Tool/MSCommon/vc.py index ec285c8..582bf23 100644 --- a/engine/SCons/Tool/MSCommon/vc.py +++ b/engine/SCons/Tool/MSCommon/vc.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ # * test on 64 bits XP + VS 2005 (and VS 6 if possible) # * SDK # * Assembly -__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 2014/03/02 14:18:15 garyo" __doc__ = """Module for Visual C/C++ detection and configuration. """ @@ -81,6 +81,7 @@ _ARCH_TO_CANONICAL = { "itanium" : "ia64", "x86" : "x86", "x86_64" : "amd64", + "x86_amd64" : "x86_amd64", # Cross compile to 64 bit from 32bits } # Given a (host, target) tuple, return the argument for the bat file. Both host @@ -88,6 +89,7 @@ _ARCH_TO_CANONICAL = { _HOST_TARGET_ARCH_TO_BAT_ARCH = { ("x86", "x86"): "x86", ("x86", "amd64"): "x86_amd64", + ("amd64", "x86_amd64"): "x86_amd64", # This is present in (at least) VS2012 express ("amd64", "amd64"): "amd64", ("amd64", "x86"): "x86", ("x86", "ia64"): "x86_ia64" @@ -256,15 +258,16 @@ def find_batch_file(env,msvc_version,host_arch,target_arch): installed_sdks=get_installed_sdks() for _sdk in installed_sdks: - sdk_bat_file=_sdk.get_sdk_vc_script(host_arch,target_arch) - sdk_bat_file_path=os.path.join(pdir,sdk_bat_file) - debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path) - if os.path.exists(sdk_bat_file_path): - return (batfilename,sdk_bat_file_path) + sdk_bat_file = _sdk.get_sdk_vc_script(host_arch,target_arch) + if not sdk_bat_file: + debug("vc.py:find_batch_file() not found:%s"%_sdk) else: - debug("vc.py:find_batch_file() not found:%s"%sdk_bat_file_path) - else: - return (batfilename,None) + sdk_bat_file_path = os.path.join(pdir,sdk_bat_file) + if os.path.exists(sdk_bat_file_path): + debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path) + return (batfilename,sdk_bat_file_path) + return (batfilename,None) + __INSTALLED_VCS_RUN = None @@ -357,13 +360,23 @@ def msvc_find_valid_batch_script(env,version): # target platform (host_platform, target_platform,req_target_platform) = get_host_target(env) - # If the user hasn't specifically requested a TARGET_ARCH, and - # The TARGET_ARCH is amd64 then also try 32 bits if there are no viable - # 64 bit tools installed try_target_archs = [target_platform] - if not req_target_platform and target_platform in ('amd64','x86_64'): + debug("msvs_find_valid_batch_script(): req_target_platform %s target_platform:%s"%(req_target_platform,target_platform)) + + # VS2012 has a "cross compile" environment to build 64 bit + # with x86_amd64 as the argument to the batch setup script + if req_target_platform in ('amd64','x86_64'): + try_target_archs.append('x86_amd64') + elif not req_target_platform and target_platform in ['amd64','x86_64']: + # There may not be "native" amd64, but maybe "cross" x86_amd64 tools + try_target_archs.append('x86_amd64') + # If the user hasn't specifically requested a TARGET_ARCH, and + # The TARGET_ARCH is amd64 then also try 32 bits if there are no viable + # 64 bit tools installed try_target_archs.append('x86') + debug("msvs_find_valid_batch_script(): host_platform: %s try_target_archs:%s"%(host_platform, try_target_archs)) + d = None for tp in try_target_archs: # Set to current arch. @@ -399,6 +412,7 @@ def msvc_find_valid_batch_script(env,version): except BatchFileExecutionError, e: debug('vc.py:msvc_find_valid_batch_script() use_script 3: failed running VC script %s: %s: Error:%s'%(repr(vc_script),arg,e)) vc_script=None + continue if not vc_script and sdk_script: debug('vc.py:msvc_find_valid_batch_script() use_script 4: trying sdk script: %s'%(sdk_script)) try: @@ -409,6 +423,9 @@ def msvc_find_valid_batch_script(env,version): elif not vc_script and not sdk_script: debug('vc.py:msvc_find_valid_batch_script() use_script 6: Neither VC script nor SDK script found') continue + + debug("vc.py:msvc_find_valid_batch_script() Found a working script/target: %s %s"%(repr(sdk_script),arg)) + break # We've found a working target_platform, so stop looking # If we cannot find a viable installed compiler, reset the TARGET_ARCH # To it's initial value diff --git a/engine/SCons/Tool/MSCommon/vs.py b/engine/SCons/Tool/MSCommon/vs.py index 18b31a0..783ca2e 100644 --- a/engine/SCons/Tool/MSCommon/vs.py +++ b/engine/SCons/Tool/MSCommon/vs.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/MSCommon/vs.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 2014/03/02 14:18:15 garyo" __doc__ = """Module to detect Visual Studio and/or Visual C/C++ """ diff --git a/engine/SCons/Tool/Perforce.py b/engine/SCons/Tool/Perforce.py index 3b56fee..3e132ad 100644 --- a/engine/SCons/Tool/Perforce.py +++ b/engine/SCons/Tool/Perforce.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -29,7 +29,7 @@ selection method. # 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__ = "src/engine/SCons/Tool/Perforce.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/Perforce.py 2014/03/02 14:18:15 garyo" import os diff --git a/engine/SCons/Tool/PharLapCommon.py b/engine/SCons/Tool/PharLapCommon.py index 7602073..dc5e9db 100644 --- a/engine/SCons/Tool/PharLapCommon.py +++ b/engine/SCons/Tool/PharLapCommon.py @@ -7,7 +7,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -29,7 +29,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/RCS.py b/engine/SCons/Tool/RCS.py index 05505ac..4ecb499 100644 --- a/engine/SCons/Tool/RCS.py +++ b/engine/SCons/Tool/RCS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -29,7 +29,7 @@ selection method. # 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__ = "src/engine/SCons/Tool/RCS.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/RCS.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/SCCS.py b/engine/SCons/Tool/SCCS.py index 6f795a5..cee057b 100644 --- a/engine/SCons/Tool/SCCS.py +++ b/engine/SCons/Tool/SCCS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -29,7 +29,7 @@ selection method. # 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__ = "src/engine/SCons/Tool/SCCS.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/SCCS.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/Subversion.py b/engine/SCons/Tool/Subversion.py index 41771ad..3b45b12 100644 --- a/engine/SCons/Tool/Subversion.py +++ b/engine/SCons/Tool/Subversion.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -29,7 +29,7 @@ selection method. # 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__ = "src/engine/SCons/Tool/Subversion.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/Subversion.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/__init__.py b/engine/SCons/Tool/__init__.py index b12095f..b946507 100644 --- a/engine/SCons/Tool/__init__.py +++ b/engine/SCons/Tool/__init__.py @@ -14,7 +14,7 @@ tool definition. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -35,7 +35,7 @@ tool definition. # 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__ = "src/engine/SCons/Tool/__init__.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/__init__.py 2014/03/02 14:18:15 garyo" import imp import sys @@ -257,6 +257,10 @@ def VersionShLibLinkNames(version, libname, env): print "VersionShLibLinkNames: linkname = ",linkname linknames.append(linkname) elif platform == 'posix': + if sys.platform.startswith('openbsd'): + # OpenBSD uses x.y shared library versioning numbering convention + # and doesn't use symlinks to backwards-compatible libraries + return [] # For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x suffix_re = re.escape(shlib_suffix + '.' + version) # First linkname has no version number @@ -302,13 +306,17 @@ symlinks for the platform we are on""" if version: # set the shared library link flags if platform == 'posix': - suffix_re = re.escape(shlib_suffix + '.' + version) - (major, age, revision) = version.split(".") - # soname will have only the major version number in it - soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major - shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ] - if Verbose: - print " soname ",soname,", shlink_flags ",shlink_flags + shlink_flags += [ '-Wl,-Bsymbolic' ] + # OpenBSD doesn't usually use SONAME for libraries + if not sys.platform.startswith('openbsd'): + # continue setup of shlink flags for all other POSIX systems + suffix_re = re.escape(shlib_suffix + '.' + version) + (major, age, revision) = version.split(".") + # soname will have only the major version number in it + soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major + shlink_flags += [ '-Wl,-soname=%s' % soname ] + if Verbose: + print " soname ",soname,", shlink_flags ",shlink_flags elif platform == 'cygwin': shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,--out-implib,${TARGET.base}.a' ] @@ -337,18 +345,32 @@ symlinks for the platform we are on""" for count in range(len(linknames)): linkname = linknames[count] if count > 0: - os.symlink(os.path.basename(linkname),lastname) + try: + os.remove(lastlinkname) + except: + pass + os.symlink(os.path.basename(linkname),lastlinkname) if Verbose: - print "VerShLib: made sym link of %s -> %s" % (lastname,linkname) - lastname = linkname + print "VerShLib: made sym link of %s -> %s" % (lastlinkname,linkname) + lastlinkname = linkname # finish chain of sym links with link to the actual library if len(linknames)>0: - os.symlink(lib_ver,lastname) + try: + os.remove(lastlinkname) + except: + pass + os.symlink(lib_ver,lastlinkname) if Verbose: - print "VerShLib: made sym link of %s -> %s" % (lib_ver,linkname) + print "VerShLib: made sym link of %s -> %s" % (linkname, lib_ver) return result -ShLibAction = SCons.Action.Action(VersionedSharedLibrary, None) +# Fix http://scons.tigris.org/issues/show_bug.cgi?id=2903 : +# Ensure we still depend on SCons.Defaults.ShLinkAction command line which is $SHLINKCOM. +# This was tricky because we don't want changing LIBPATH to cause a rebuild, but +# changing other link args should. LIBPATH has $( ... $) around it but until this +# fix, when the varlist was added to the build sig those ignored parts weren't getting +# ignored. +ShLibAction = SCons.Action.Action(VersionedSharedLibrary, None, varlist=['SHLINKCOM']) def createSharedLibBuilder(env): """This is a utility function that creates the SharedLibrary @@ -733,6 +755,14 @@ def tool_list(platform, env): assemblers = ['as'] fortran_compilers = ['gfortran', 'f95', 'f90', 'g77'] ars = ['ar'] + elif str(platform) == 'cygwin': + "prefer GNU tools on Cygwin, except for a platform-specific linker" + linkers = ['cyglink', 'mslink', 'ilink'] + c_compilers = ['gcc', 'msvc', 'intelc', 'icc', 'cc'] + cxx_compilers = ['g++', 'msvc', 'intelc', 'icc', 'c++'] + assemblers = ['gas', 'nasm', 'masm'] + fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77'] + ars = ['ar', 'mslib'] else: "prefer GNU tools on all other platforms" linkers = ['gnulink', 'mslink', 'ilink'] diff --git a/engine/SCons/Tool/aixc++.py b/engine/SCons/Tool/aixc++.py index e9cc5c2..6f1ea5b 100644 --- a/engine/SCons/Tool/aixc++.py +++ b/engine/SCons/Tool/aixc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixc++.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/aixc++.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/aixcc.py b/engine/SCons/Tool/aixcc.py index 44cb0ab..bdcb681 100644 --- a/engine/SCons/Tool/aixcc.py +++ b/engine/SCons/Tool/aixcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/aixcc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/aixcc.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/aixf77.py b/engine/SCons/Tool/aixf77.py index 19f8594..3a8400b 100644 --- a/engine/SCons/Tool/aixf77.py +++ b/engine/SCons/Tool/aixf77.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/aixf77.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/aixf77.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/aixlink.py b/engine/SCons/Tool/aixlink.py index 980568a..44a7ca5 100644 --- a/engine/SCons/Tool/aixlink.py +++ b/engine/SCons/Tool/aixlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/aixlink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/aixlink.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/applelink.py b/engine/SCons/Tool/applelink.py index a67fc10..70ad558 100644 --- a/engine/SCons/Tool/applelink.py +++ b/engine/SCons/Tool/applelink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/applelink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/applelink.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/ar.py b/engine/SCons/Tool/ar.py index c11b543..d9ef9a4 100644 --- a/engine/SCons/Tool/ar.py +++ b/engine/SCons/Tool/ar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ar.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/ar.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/as.py b/engine/SCons/Tool/as.py index 29b0266..d245f7b 100644 --- a/engine/SCons/Tool/as.py +++ b/engine/SCons/Tool/as.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/as.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/as.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/bcc32.py b/engine/SCons/Tool/bcc32.py index c152353..ce4f234 100644 --- a/engine/SCons/Tool/bcc32.py +++ b/engine/SCons/Tool/bcc32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/bcc32.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/bcc32.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/c++.py b/engine/SCons/Tool/c++.py index 18f4afe..7b98b76 100644 --- a/engine/SCons/Tool/c++.py +++ b/engine/SCons/Tool/c++.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/c++.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/c++.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/cc.py b/engine/SCons/Tool/cc.py index 00ecc2f..0702138 100644 --- a/engine/SCons/Tool/cc.py +++ b/engine/SCons/Tool/cc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/cc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/cc.py 2014/03/02 14:18:15 garyo" import SCons.Tool import SCons.Defaults diff --git a/engine/SCons/Tool/cvf.py b/engine/SCons/Tool/cvf.py index 2bf10da..d35c1b1 100644 --- a/engine/SCons/Tool/cvf.py +++ b/engine/SCons/Tool/cvf.py @@ -5,7 +5,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/cvf.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/cvf.py 2014/03/02 14:18:15 garyo" import fortran diff --git a/engine/SCons/Tool/cyglink.py b/engine/SCons/Tool/cyglink.py new file mode 100644 index 0000000..87716cf --- /dev/null +++ b/engine/SCons/Tool/cyglink.py @@ -0,0 +1,94 @@ +"""SCons.Tool.cyglink + +Customization of gnulink for Cygwin (http://www.cygwin.com/) + +There normally shouldn't be any need to import this module directly. +It will usually be imported through the generic SCons.Tool.Tool() +selection method. + +""" + +import SCons.Action +import SCons.Util + +import gnulink + +def shlib_generator(target, source, env, for_signature): + cmd = SCons.Util.CLVar(['$SHLINK']) + + dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX') + if dll: cmd.extend(['-o', dll]) + + cmd.extend(['$SHLINKFLAGS', '$__RPATH']) + + implib = env.FindIxes(target, 'IMPLIBPREFIX', 'IMPLIBSUFFIX') + if implib: + cmd.extend([ + '-Wl,--out-implib='+implib.get_string(for_signature), + '-Wl,--export-all-symbols', + '-Wl,--enable-auto-import', + '-Wl,--whole-archive', '$SOURCES', + '-Wl,--no-whole-archive', '$_LIBDIRFLAGS', '$_LIBFLAGS' + ]) + else: + cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS']) + + return [cmd] + +def shlib_emitter(target, source, env): + dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX') + no_import_lib = env.get('no_import_lib', 0) + + if not dll or len(target) > 1: + raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")) + + # Remove any "lib" after the prefix + pre = env.subst('$SHLIBPREFIX') + if dll.name[len(pre):len(pre)+3] == 'lib': + dll.name = pre + dll.name[len(pre)+3:] + + orig_target = target + target = [env.fs.File(dll)] + target[0].attributes.shared = 1 + + # Append an import lib target + if not no_import_lib: + # Create list of target libraries as strings + target_strings = env.ReplaceIxes(orig_target[0], + 'SHLIBPREFIX', 'SHLIBSUFFIX', + 'IMPLIBPREFIX', 'IMPLIBSUFFIX') + + implib_target = env.fs.File(target_strings) + implib_target.attributes.shared = 1 + target.append(implib_target) + + return (target, source) + + +shlib_action = SCons.Action.Action(shlib_generator, generator=1) + +def generate(env): + """Add Builders and construction variables for cyglink to an Environment.""" + gnulink.generate(env) + + env['LINKFLAGS'] = SCons.Util.CLVar('-Wl,-no-undefined') + + env['SHLINKCOM'] = shlib_action + env['LDMODULECOM'] = shlib_action + env.Append(SHLIBEMITTER = [shlib_emitter]) + + env['SHLIBPREFIX'] = 'cyg' + env['SHLIBSUFFIX'] = '.dll' + + env['IMPLIBPREFIX'] = 'lib' + env['IMPLIBSUFFIX'] = '.dll.a' + +def exists(env): + return gnulink.exists(env) + + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/engine/SCons/Tool/default.py b/engine/SCons/Tool/default.py index 4faab7e..ccb215c 100644 --- a/engine/SCons/Tool/default.py +++ b/engine/SCons/Tool/default.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/default.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/default.py 2014/03/02 14:18:15 garyo" import SCons.Tool diff --git a/engine/SCons/Tool/dmd.py b/engine/SCons/Tool/dmd.py index 3c73f80..67355b1 100644 --- a/engine/SCons/Tool/dmd.py +++ b/engine/SCons/Tool/dmd.py @@ -35,7 +35,7 @@ Lib tool variables: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -57,7 +57,7 @@ Lib tool variables: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dmd.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/dmd.py 2014/03/02 14:18:15 garyo" import os diff --git a/engine/SCons/Tool/docbook/__init__.py b/engine/SCons/Tool/docbook/__init__.py new file mode 100644 index 0000000..72ea175 --- /dev/null +++ b/engine/SCons/Tool/docbook/__init__.py @@ -0,0 +1,877 @@ + +"""SCons.Tool.docbook + +Tool-specific initialization for Docbook. + +There normally shouldn't be any need to import this module directly. +It will usually be imported through the generic SCons.Tool.Tool() +selection method. + +""" + +# +# Copyright (c) 2001-7,2010 The SCons Foundation +# +# 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. +# + +import os +import glob +import re + +import SCons.Action +import SCons.Builder +import SCons.Defaults +import SCons.Script +import SCons.Tool +import SCons.Util + +# Get full path to this script +scriptpath = os.path.dirname(os.path.realpath(__file__)) + +# Local folder for the collection of DocBook XSLs +db_xsl_folder = 'docbook-xsl-1.76.1' + +# Do we have libxml2/libxslt/lxml? +has_libxml2 = True +has_lxml = True +try: + import libxml2 + import libxslt +except: + has_libxml2 = False +try: + import lxml +except: + has_lxml = False + +# Set this to True, to prefer xsltproc over libxml2 and lxml +prefer_xsltproc = False + +# Regexs for parsing Docbook XML sources of MAN pages +re_manvolnum = re.compile("<manvolnum>([^<]*)</manvolnum>") +re_refname = re.compile("<refname>([^<]*)</refname>") + +# +# Helper functions +# +def __extend_targets_sources(target, source): + """ Prepare the lists of target and source files. """ + if not SCons.Util.is_List(target): + target = [target] + if not source: + source = target[:] + elif not SCons.Util.is_List(source): + source = [source] + if len(target) < len(source): + target.extend(source[len(target):]) + + return target, source + +def __init_xsl_stylesheet(kw, env, user_xsl_var, default_path): + if kw.get('DOCBOOK_XSL','') == '': + xsl_style = kw.get('xsl', env.subst(user_xsl_var)) + if xsl_style == '': + path_args = [scriptpath, db_xsl_folder] + default_path + xsl_style = os.path.join(*path_args) + kw['DOCBOOK_XSL'] = xsl_style + +def __select_builder(lxml_builder, libxml2_builder, cmdline_builder): + """ Selects a builder, based on which Python modules are present. """ + if prefer_xsltproc: + return cmdline_builder + + if not has_libxml2: + # At the moment we prefer libxml2 over lxml, the latter can lead + # to conflicts when installed together with libxml2. + if has_lxml: + return lxml_builder + else: + return cmdline_builder + + return libxml2_builder + +def __ensure_suffix(t, suffix): + """ Ensure that the target t has the given suffix. """ + tpath = str(t) + if not tpath.endswith(suffix): + return tpath+suffix + + return t + +def __ensure_suffix_stem(t, suffix): + """ Ensure that the target t has the given suffix, and return the file's stem. """ + tpath = str(t) + if not tpath.endswith(suffix): + stem = tpath + tpath += suffix + + return tpath, stem + else: + stem, ext = os.path.splitext(tpath) + + return t, stem + +def __get_xml_text(root): + """ Return the text for the given root node (xml.dom.minidom). """ + txt = "" + for e in root.childNodes: + if (e.nodeType == e.TEXT_NODE): + txt += e.data + return txt + +def __create_output_dir(base_dir): + """ Ensure that the output directory base_dir exists. """ + root, tail = os.path.split(base_dir) + dir = None + if tail: + if base_dir.endswith('/'): + dir = base_dir + else: + dir = root + else: + if base_dir.endswith('/'): + dir = base_dir + + if dir and not os.path.isdir(dir): + os.makedirs(dir) + + +# +# Supported command line tools and their call "signature" +# +xsltproc_com = {'xsltproc' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE', + 'saxon' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS', + 'saxon-xslt' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS', + 'xalan' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -q -out $TARGET -xsl $DOCBOOK_XSL -in $SOURCE'} +xmllint_com = {'xmllint' : '$DOCBOOK_XMLLINT $DOCBOOK_XMLLINTFLAGS --xinclude $SOURCE > $TARGET'} +fop_com = {'fop' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -fo $SOURCE -pdf $TARGET', + 'xep' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -valid -fo $SOURCE -pdf $TARGET', + 'jw' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -f docbook -b pdf $SOURCE -o $TARGET'} + +def __detect_cl_tool(env, chainkey, cdict): + """ + Helper function, picks a command line tool from the list + and initializes its environment variables. + """ + if env.get(chainkey,'') == '': + clpath = '' + for cltool in cdict: + clpath = env.WhereIs(cltool) + if clpath: + env[chainkey] = clpath + if not env[chainkey + 'COM']: + env[chainkey + 'COM'] = cdict[cltool] + +def _detect(env): + """ + Detect all the command line tools that we might need for creating + the requested output formats. + """ + global prefer_xsltproc + + if env.get('DOCBOOK_PREFER_XSLTPROC',''): + prefer_xsltproc = True + + if ((not has_libxml2 and not has_lxml) or (prefer_xsltproc)): + # Try to find the XSLT processors + __detect_cl_tool(env, 'DOCBOOK_XSLTPROC', xsltproc_com) + __detect_cl_tool(env, 'DOCBOOK_XMLLINT', xmllint_com) + + __detect_cl_tool(env, 'DOCBOOK_FOP', fop_com) + +# +# Scanners +# +include_re = re.compile('fileref\\s*=\\s*["|\']([^\\n]*)["|\']') +sentity_re = re.compile('<!ENTITY\\s+%*\\s*[^\\s]+\\s+SYSTEM\\s+["|\']([^\\n]*)["|\']>') + +def __xml_scan(node, env, path, arg): + """ Simple XML file scanner, detecting local images and XIncludes as implicit dependencies. """ + # Does the node exist yet? + if not os.path.isfile(str(node)): + return [] + + if env.get('DOCBOOK_SCANENT',''): + # Use simple pattern matching for system entities..., no support + # for recursion yet. + contents = node.get_text_contents() + return sentity_re.findall(contents) + + xsl_file = os.path.join(scriptpath,'utils','xmldepend.xsl') + if not has_libxml2 or prefer_xsltproc: + if has_lxml and not prefer_xsltproc: + + from lxml import etree + + xsl_tree = etree.parse(xsl_file) + doc = etree.parse(str(node)) + result = doc.xslt(xsl_tree) + + depfiles = [x.strip() for x in str(result).splitlines() if x.strip() != "" and not x.startswith("<?xml ")] + return depfiles + else: + # Try to call xsltproc + xsltproc = env.subst("$DOCBOOK_XSLTPROC") + if xsltproc and xsltproc.endswith('xsltproc'): + result = env.backtick(' '.join([xsltproc, xsl_file, str(node)])) + depfiles = [x.strip() for x in str(result).splitlines() if x.strip() != "" and not x.startswith("<?xml ")] + return depfiles + else: + # Use simple pattern matching, there is currently no support + # for xi:includes... + contents = node.get_text_contents() + return include_re.findall(contents) + + styledoc = libxml2.parseFile(xsl_file) + style = libxslt.parseStylesheetDoc(styledoc) + doc = libxml2.parseFile(str(node)) + result = style.applyStylesheet(doc, None) + + depfiles = [] + for x in str(result).splitlines(): + if x.strip() != "" and not x.startswith("<?xml "): + depfiles.extend(x.strip().split()) + + style.freeStylesheet() + doc.freeDoc() + result.freeDoc() + + return depfiles + +# Creating the instance of our XML dependency scanner +docbook_xml_scanner = SCons.Script.Scanner(function = __xml_scan, + argument = None) + + +# +# Action generators +# +def __generate_xsltproc_action(source, target, env, for_signature): + cmd = env['DOCBOOK_XSLTPROCCOM'] + # Does the environment have a base_dir defined? + base_dir = env.subst('$base_dir') + if base_dir: + # Yes, so replace target path by its filename + return cmd.replace('$TARGET','${TARGET.file}') + return cmd + + +# +# Emitters +# +def __emit_xsl_basedir(target, source, env): + # Does the environment have a base_dir defined? + base_dir = env.subst('$base_dir') + if base_dir: + # Yes, so prepend it to each target + return [os.path.join(base_dir, str(t)) for t in target], source + + # No, so simply pass target and source names through + return target, source + + +# +# Builders +# +def __build_libxml2(target, source, env): + """ + General XSLT builder (HTML/FO), using the libxml2 module. + """ + xsl_style = env.subst('$DOCBOOK_XSL') + styledoc = libxml2.parseFile(xsl_style) + style = libxslt.parseStylesheetDoc(styledoc) + doc = libxml2.readFile(str(source[0]),None,libxml2.XML_PARSE_NOENT) + # Support for additional parameters + parampass = {} + if parampass: + result = style.applyStylesheet(doc, parampass) + else: + result = style.applyStylesheet(doc, None) + style.saveResultToFilename(str(target[0]), result, 0) + style.freeStylesheet() + doc.freeDoc() + result.freeDoc() + + return None + +def __build_lxml(target, source, env): + """ + General XSLT builder (HTML/FO), using the lxml module. + """ + from lxml import etree + + xslt_ac = etree.XSLTAccessControl(read_file=True, + write_file=True, + create_dir=True, + read_network=False, + write_network=False) + xsl_style = env.subst('$DOCBOOK_XSL') + xsl_tree = etree.parse(xsl_style) + transform = etree.XSLT(xsl_tree, access_control=xslt_ac) + doc = etree.parse(str(source[0])) + # Support for additional parameters + parampass = {} + if parampass: + result = transform(doc, **parampass) + else: + result = transform(doc) + + try: + of = open(str(target[0]), "w") + of.write(of.write(etree.tostring(result, pretty_print=True))) + of.close() + except: + pass + + return None + +def __xinclude_libxml2(target, source, env): + """ + Resolving XIncludes, using the libxml2 module. + """ + doc = libxml2.readFile(str(source[0]), None, libxml2.XML_PARSE_NOENT) + doc.xincludeProcess() + doc.saveFile(str(target[0])) + doc.freeDoc() + + return None + +def __xinclude_lxml(target, source, env): + """ + Resolving XIncludes, using the lxml module. + """ + from lxml import etree + + doc = etree.parse(str(source[0])) + doc.xinclude() + try: + doc.write(str(target[0]), xml_declaration=True, + encoding="UTF-8", pretty_print=True) + except: + pass + + return None + +__libxml2_builder = SCons.Builder.Builder( + action = __build_libxml2, + src_suffix = '.xml', + source_scanner = docbook_xml_scanner, + emitter = __emit_xsl_basedir) +__lxml_builder = SCons.Builder.Builder( + action = __build_lxml, + src_suffix = '.xml', + source_scanner = docbook_xml_scanner, + emitter = __emit_xsl_basedir) + +__xinclude_libxml2_builder = SCons.Builder.Builder( + action = __xinclude_libxml2, + suffix = '.xml', + src_suffix = '.xml', + source_scanner = docbook_xml_scanner) +__xinclude_lxml_builder = SCons.Builder.Builder( + action = __xinclude_lxml, + suffix = '.xml', + src_suffix = '.xml', + source_scanner = docbook_xml_scanner) + +__xsltproc_builder = SCons.Builder.Builder( + action = SCons.Action.CommandGeneratorAction(__generate_xsltproc_action, + {'cmdstr' : '$DOCBOOK_XSLTPROCCOMSTR'}), + src_suffix = '.xml', + source_scanner = docbook_xml_scanner, + emitter = __emit_xsl_basedir) +__xmllint_builder = SCons.Builder.Builder( + action = SCons.Action.Action('$DOCBOOK_XMLLINTCOM','$DOCBOOK_XMLLINTCOMSTR'), + suffix = '.xml', + src_suffix = '.xml', + source_scanner = docbook_xml_scanner) +__fop_builder = SCons.Builder.Builder( + action = SCons.Action.Action('$DOCBOOK_FOPCOM','$DOCBOOK_FOPCOMSTR'), + suffix = '.pdf', + src_suffix = '.fo', + ensure_suffix=1) + +def DocbookEpub(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for ePub output. + """ + import zipfile + import shutil + + def build_open_container(target, source, env): + """Generate the *.epub file from intermediate outputs + + Constructs the epub file according to the Open Container Format. This + function could be replaced by a call to the SCons Zip builder if support + was added for different compression formats for separate source nodes. + """ + zf = zipfile.ZipFile(str(target[0]), 'w') + mime_file = open('mimetype', 'w') + mime_file.write('application/epub+zip') + mime_file.close() + zf.write(mime_file.name, compress_type = zipfile.ZIP_STORED) + for s in source: + for dirpath, dirnames, filenames in os.walk(str(s)): + for fname in filenames: + path = os.path.join(dirpath, fname) + if os.path.isfile(path): + zf.write(path, os.path.relpath(path, str(env.get('ZIPROOT', ''))), + zipfile.ZIP_DEFLATED) + zf.close() + + def add_resources(target, source, env): + """Add missing resources to the OEBPS directory + + Ensure all the resources in the manifest are present in the OEBPS directory. + """ + hrefs = [] + content_file = os.path.join(source[0].abspath, 'content.opf') + if not os.path.isfile(content_file): + return + + hrefs = [] + if has_libxml2: + nsmap = {'opf' : 'http://www.idpf.org/2007/opf'} + # Read file and resolve entities + doc = libxml2.readFile(content_file, None, 0) + opf = doc.getRootElement() + # Create xpath context + xpath_context = doc.xpathNewContext() + # Register namespaces + for key, val in nsmap.iteritems(): + xpath_context.xpathRegisterNs(key, val) + + if hasattr(opf, 'xpathEval') and xpath_context: + # Use the xpath context + xpath_context.setContextNode(opf) + items = xpath_context.xpathEval(".//opf:item") + else: + items = opf.findall(".//{'http://www.idpf.org/2007/opf'}item") + + for item in items: + if hasattr(item, 'prop'): + hrefs.append(item.prop('href')) + else: + hrefs.append(item.attrib['href']) + + doc.freeDoc() + xpath_context.xpathFreeContext() + elif has_lxml: + from lxml import etree + + opf = etree.parse(content_file) + # All the opf:item elements are resources + for item in opf.xpath('//opf:item', + namespaces= { 'opf': 'http://www.idpf.org/2007/opf' }): + hrefs.append(item.attrib['href']) + + for href in hrefs: + # If the resource was not already created by DocBook XSL itself, + # copy it into the OEBPS folder + referenced_file = os.path.join(source[0].abspath, href) + if not os.path.exists(referenced_file): + shutil.copy(href, os.path.join(source[0].abspath, href)) + + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_EPUB', ['epub','docbook.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Create targets + result = [] + if not env.GetOption('clean'): + # Ensure that the folders OEBPS and META-INF exist + __create_output_dir('OEBPS/') + __create_output_dir('META-INF/') + dirs = env.Dir(['OEBPS', 'META-INF']) + + # Set the fixed base_dir + kw['base_dir'] = 'OEBPS/' + tocncx = __builder.__call__(env, 'toc.ncx', source[0], **kw) + cxml = env.File('META-INF/container.xml') + env.SideEffect(cxml, tocncx) + + env.Depends(tocncx, kw['DOCBOOK_XSL']) + result.extend(tocncx+[cxml]) + + container = env.Command(__ensure_suffix(str(target[0]), '.epub'), + tocncx+[cxml], [add_resources, build_open_container]) + mimetype = env.File('mimetype') + env.SideEffect(mimetype, container) + + result.extend(container) + # Add supporting files for cleanup + env.Clean(tocncx, dirs) + + return result + +def DocbookHtml(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for HTML output. + """ + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTML', ['html','docbook.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Create targets + result = [] + for t,s in zip(target,source): + r = __builder.__call__(env, __ensure_suffix(t,'.html'), s, **kw) + env.Depends(r, kw['DOCBOOK_XSL']) + result.extend(r) + + return result + +def DocbookHtmlChunked(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for chunked HTML output. + """ + # Init target/source + if not SCons.Util.is_List(target): + target = [target] + if not source: + source = target + target = ['index.html'] + elif not SCons.Util.is_List(source): + source = [source] + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLCHUNKED', ['html','chunkfast.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Detect base dir + base_dir = kw.get('base_dir', '') + if base_dir: + __create_output_dir(base_dir) + + # Create targets + result = [] + r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw) + env.Depends(r, kw['DOCBOOK_XSL']) + result.extend(r) + # Add supporting files for cleanup + env.Clean(r, glob.glob(os.path.join(base_dir, '*.html'))) + + return result + + +def DocbookHtmlhelp(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for HTMLHELP output. + """ + # Init target/source + if not SCons.Util.is_List(target): + target = [target] + if not source: + source = target + target = ['index.html'] + elif not SCons.Util.is_List(source): + source = [source] + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLHELP', ['htmlhelp','htmlhelp.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Detect base dir + base_dir = kw.get('base_dir', '') + if base_dir: + __create_output_dir(base_dir) + + # Create targets + result = [] + r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw) + env.Depends(r, kw['DOCBOOK_XSL']) + result.extend(r) + # Add supporting files for cleanup + env.Clean(r, ['toc.hhc', 'htmlhelp.hhp', 'index.hhk'] + + glob.glob(os.path.join(base_dir, '[ar|bk|ch]*.html'))) + + return result + +def DocbookPdf(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for PDF output. + """ + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_PDF', ['fo','docbook.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Create targets + result = [] + for t,s in zip(target,source): + t, stem = __ensure_suffix_stem(t, '.pdf') + xsl = __builder.__call__(env, stem+'.fo', s, **kw) + result.extend(xsl) + env.Depends(xsl, kw['DOCBOOK_XSL']) + result.extend(__fop_builder.__call__(env, t, xsl, **kw)) + + return result + +def DocbookMan(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for Man page output. + """ + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_MAN', ['manpages','docbook.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Create targets + result = [] + for t,s in zip(target,source): + volnum = "1" + outfiles = [] + srcfile = __ensure_suffix(str(s),'.xml') + if os.path.isfile(srcfile): + try: + import xml.dom.minidom + + dom = xml.dom.minidom.parse(__ensure_suffix(str(s),'.xml')) + # Extract volume number, default is 1 + for node in dom.getElementsByTagName('refmeta'): + for vol in node.getElementsByTagName('manvolnum'): + volnum = __get_xml_text(vol) + + # Extract output filenames + for node in dom.getElementsByTagName('refnamediv'): + for ref in node.getElementsByTagName('refname'): + outfiles.append(__get_xml_text(ref)+'.'+volnum) + + except: + # Use simple regex parsing + f = open(__ensure_suffix(str(s),'.xml'), 'r') + content = f.read() + f.close() + + for m in re_manvolnum.finditer(content): + volnum = m.group(1) + + for m in re_refname.finditer(content): + outfiles.append(m.group(1)+'.'+volnum) + + if not outfiles: + # Use stem of the source file + spath = str(s) + if not spath.endswith('.xml'): + outfiles.append(spath+'.'+volnum) + else: + stem, ext = os.path.splitext(spath) + outfiles.append(stem+'.'+volnum) + else: + # We have to completely rely on the given target name + outfiles.append(t) + + __builder.__call__(env, outfiles[0], s, **kw) + env.Depends(outfiles[0], kw['DOCBOOK_XSL']) + result.append(outfiles[0]) + if len(outfiles) > 1: + env.Clean(outfiles[0], outfiles[1:]) + + + return result + +def DocbookSlidesPdf(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for PDF slides output. + """ + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESPDF', ['slides','fo','plain.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Create targets + result = [] + for t,s in zip(target,source): + t, stem = __ensure_suffix_stem(t, '.pdf') + xsl = __builder.__call__(env, stem+'.fo', s, **kw) + env.Depends(xsl, kw['DOCBOOK_XSL']) + result.extend(xsl) + result.extend(__fop_builder.__call__(env, t, xsl, **kw)) + + return result + +def DocbookSlidesHtml(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, providing a Docbook toolchain for HTML slides output. + """ + # Init list of targets/sources + if not SCons.Util.is_List(target): + target = [target] + if not source: + source = target + target = ['index.html'] + elif not SCons.Util.is_List(source): + source = [source] + + # Init XSL stylesheet + __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESHTML', ['slides','html','plain.xsl']) + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Detect base dir + base_dir = kw.get('base_dir', '') + if base_dir: + __create_output_dir(base_dir) + + # Create targets + result = [] + r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw) + env.Depends(r, kw['DOCBOOK_XSL']) + result.extend(r) + # Add supporting files for cleanup + env.Clean(r, [os.path.join(base_dir, 'toc.html')] + + glob.glob(os.path.join(base_dir, 'foil*.html'))) + + return result + +def DocbookXInclude(env, target, source, *args, **kw): + """ + A pseudo-Builder, for resolving XIncludes in a separate processing step. + """ + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Setup builder + __builder = __select_builder(__xinclude_lxml_builder,__xinclude_libxml2_builder,__xmllint_builder) + + # Create targets + result = [] + for t,s in zip(target,source): + result.extend(__builder.__call__(env, t, s, **kw)) + + return result + +def DocbookXslt(env, target, source=None, *args, **kw): + """ + A pseudo-Builder, applying a simple XSL transformation to the input file. + """ + # Init list of targets/sources + target, source = __extend_targets_sources(target, source) + + # Init XSL stylesheet + kw['DOCBOOK_XSL'] = kw.get('xsl', 'transform.xsl') + + # Setup builder + __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder) + + # Create targets + result = [] + for t,s in zip(target,source): + r = __builder.__call__(env, t, s, **kw) + env.Depends(r, kw['DOCBOOK_XSL']) + result.extend(r) + + return result + + +def generate(env): + """Add Builders and construction variables for docbook to an Environment.""" + + env.SetDefault( + # Default names for customized XSL stylesheets + DOCBOOK_DEFAULT_XSL_EPUB = '', + DOCBOOK_DEFAULT_XSL_HTML = '', + DOCBOOK_DEFAULT_XSL_HTMLCHUNKED = '', + DOCBOOK_DEFAULT_XSL_HTMLHELP = '', + DOCBOOK_DEFAULT_XSL_PDF = '', + DOCBOOK_DEFAULT_XSL_MAN = '', + DOCBOOK_DEFAULT_XSL_SLIDESPDF = '', + DOCBOOK_DEFAULT_XSL_SLIDESHTML = '', + + # Paths to the detected executables + DOCBOOK_XSLTPROC = '', + DOCBOOK_XMLLINT = '', + DOCBOOK_FOP = '', + + # Additional flags for the text processors + DOCBOOK_XSLTPROCFLAGS = SCons.Util.CLVar(''), + DOCBOOK_XMLLINTFLAGS = SCons.Util.CLVar(''), + DOCBOOK_FOPFLAGS = SCons.Util.CLVar(''), + DOCBOOK_XSLTPROCPARAMS = SCons.Util.CLVar(''), + + # Default command lines for the detected executables + DOCBOOK_XSLTPROCCOM = xsltproc_com['xsltproc'], + DOCBOOK_XMLLINTCOM = xmllint_com['xmllint'], + DOCBOOK_FOPCOM = fop_com['fop'], + + # Screen output for the text processors + DOCBOOK_XSLTPROCCOMSTR = None, + DOCBOOK_XMLLINTCOMSTR = None, + DOCBOOK_FOPCOMSTR = None, + + ) + _detect(env) + + try: + env.AddMethod(DocbookEpub, "DocbookEpub") + env.AddMethod(DocbookHtml, "DocbookHtml") + env.AddMethod(DocbookHtmlChunked, "DocbookHtmlChunked") + env.AddMethod(DocbookHtmlhelp, "DocbookHtmlhelp") + env.AddMethod(DocbookPdf, "DocbookPdf") + env.AddMethod(DocbookMan, "DocbookMan") + env.AddMethod(DocbookSlidesPdf, "DocbookSlidesPdf") + env.AddMethod(DocbookSlidesHtml, "DocbookSlidesHtml") + env.AddMethod(DocbookXInclude, "DocbookXInclude") + env.AddMethod(DocbookXslt, "DocbookXslt") + except AttributeError: + # Looks like we use a pre-0.98 version of SCons... + from SCons.Script.SConscript import SConsEnvironment + SConsEnvironment.DocbookEpub = DocbookEpub + SConsEnvironment.DocbookHtml = DocbookHtml + SConsEnvironment.DocbookHtmlChunked = DocbookHtmlChunked + SConsEnvironment.DocbookHtmlhelp = DocbookHtmlhelp + SConsEnvironment.DocbookPdf = DocbookPdf + SConsEnvironment.DocbookMan = DocbookMan + SConsEnvironment.DocbookSlidesPdf = DocbookSlidesPdf + SConsEnvironment.DocbookSlidesHtml = DocbookSlidesHtml + SConsEnvironment.DocbookXInclude = DocbookXInclude + SConsEnvironment.DocbookXslt = DocbookXslt + + +def exists(env): + return 1 diff --git a/engine/SCons/Tool/dvi.py b/engine/SCons/Tool/dvi.py index 496e698..f5caf21 100644 --- a/engine/SCons/Tool/dvi.py +++ b/engine/SCons/Tool/dvi.py @@ -5,7 +5,7 @@ Common DVI Builder definition for various other Tool modules that use it. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvi.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/dvi.py 2014/03/02 14:18:15 garyo" import SCons.Builder import SCons.Tool diff --git a/engine/SCons/Tool/dvipdf.py b/engine/SCons/Tool/dvipdf.py index 5fe8d88..a49a112 100644 --- a/engine/SCons/Tool/dvipdf.py +++ b/engine/SCons/Tool/dvipdf.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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. # 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__ = "src/engine/SCons/Tool/dvipdf.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/dvipdf.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Defaults diff --git a/engine/SCons/Tool/dvips.py b/engine/SCons/Tool/dvips.py index a0f9e6f..2b09245 100644 --- a/engine/SCons/Tool/dvips.py +++ b/engine/SCons/Tool/dvips.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvips.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/dvips.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/f03.py b/engine/SCons/Tool/f03.py index 7915625..258db70 100644 --- a/engine/SCons/Tool/f03.py +++ b/engine/SCons/Tool/f03.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f03.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/f03.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/f77.py b/engine/SCons/Tool/f77.py index 7f49892..c56f727 100644 --- a/engine/SCons/Tool/f77.py +++ b/engine/SCons/Tool/f77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f77.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/f77.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/engine/SCons/Tool/f90.py b/engine/SCons/Tool/f90.py index bd07ae0..39be3b4 100644 --- a/engine/SCons/Tool/f90.py +++ b/engine/SCons/Tool/f90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f90.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/f90.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/engine/SCons/Tool/f95.py b/engine/SCons/Tool/f95.py index 5c16d48..3acc39a 100644 --- a/engine/SCons/Tool/f95.py +++ b/engine/SCons/Tool/f95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f95.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/f95.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/filesystem.py b/engine/SCons/Tool/filesystem.py index 431ad4c..3c124b7 100644 --- a/engine/SCons/Tool/filesystem.py +++ b/engine/SCons/Tool/filesystem.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/filesystem.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/filesystem.py 2014/03/02 14:18:15 garyo" import SCons from SCons.Tool.install import copyFunc diff --git a/engine/SCons/Tool/fortran.py b/engine/SCons/Tool/fortran.py index 35fcd53..b3b0d0b 100644 --- a/engine/SCons/Tool/fortran.py +++ b/engine/SCons/Tool/fortran.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/fortran.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/fortran.py 2014/03/02 14:18:15 garyo" import re diff --git a/engine/SCons/Tool/g++.py b/engine/SCons/Tool/g++.py index be7d935..d894644 100644 --- a/engine/SCons/Tool/g++.py +++ b/engine/SCons/Tool/g++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/g++.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/g++.py 2014/03/02 14:18:15 garyo" import os.path import re diff --git a/engine/SCons/Tool/g77.py b/engine/SCons/Tool/g77.py index 5e1d1a1..7a7b7ae 100644 --- a/engine/SCons/Tool/g77.py +++ b/engine/SCons/Tool/g77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/g77.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/g77.py 2014/03/02 14:18:15 garyo" import SCons.Util from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env diff --git a/engine/SCons/Tool/gas.py b/engine/SCons/Tool/gas.py index 143ede9..f016c96 100644 --- a/engine/SCons/Tool/gas.py +++ b/engine/SCons/Tool/gas.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gas.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/gas.py 2014/03/02 14:18:15 garyo" as_module = __import__('as', globals(), locals(), []) diff --git a/engine/SCons/Tool/gcc.py b/engine/SCons/Tool/gcc.py index 5b49ff8..09e4831 100644 --- a/engine/SCons/Tool/gcc.py +++ b/engine/SCons/Tool/gcc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gcc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/gcc.py 2014/03/02 14:18:15 garyo" import cc import os diff --git a/engine/SCons/Tool/gettext.py b/engine/SCons/Tool/gettext.py index b561eda..8a25888 100644 --- a/engine/SCons/Tool/gettext.py +++ b/engine/SCons/Tool/gettext.py @@ -2,7 +2,7 @@ """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -23,7 +23,7 @@ # 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__ = "src/engine/SCons/Tool/gettext.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/gettext.py 2014/03/02 14:18:15 garyo" ############################################################################# def generate(env,**kw): diff --git a/engine/SCons/Tool/gfortran.py b/engine/SCons/Tool/gfortran.py index 463f70e..4d2c137 100644 --- a/engine/SCons/Tool/gfortran.py +++ b/engine/SCons/Tool/gfortran.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gfortran.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/gfortran.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/gnulink.py b/engine/SCons/Tool/gnulink.py index 281a0d0..d475de4 100644 --- a/engine/SCons/Tool/gnulink.py +++ b/engine/SCons/Tool/gnulink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gnulink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/gnulink.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/gs.py b/engine/SCons/Tool/gs.py index fc53b7e..91c6434 100644 --- a/engine/SCons/Tool/gs.py +++ b/engine/SCons/Tool/gs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,9 +31,10 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gs.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/gs.py 2014/03/02 14:18:15 garyo" import SCons.Action +import SCons.Builder import SCons.Platform import SCons.Util @@ -52,17 +53,26 @@ GhostscriptAction = None def generate(env): """Add Builders and construction variables for Ghostscript to an Environment.""" - global GhostscriptAction - if GhostscriptAction is None: - GhostscriptAction = SCons.Action.Action('$GSCOM', '$GSCOMSTR') - - import pdf - pdf.generate(env) - - bld = env['BUILDERS']['PDF'] - bld.add_action('.ps', GhostscriptAction) - + # The following try-except block enables us to use the Tool + # in standalone mode (without the accompanying pdf.py), + # whenever we need an explicit call of gs via the Gs() + # Builder ... + try: + if GhostscriptAction is None: + GhostscriptAction = SCons.Action.Action('$GSCOM', '$GSCOMSTR') + + import pdf + pdf.generate(env) + + bld = env['BUILDERS']['PDF'] + bld.add_action('.ps', GhostscriptAction) + except ImportError, e: + pass + + gsbuilder = SCons.Builder.Builder(action = SCons.Action.Action('$GSCOM', '$GSCOMSTR')) + env['BUILDERS']['Gs'] = gsbuilder + env['GS'] = gs env['GSFLAGS'] = SCons.Util.CLVar('-dNOPAUSE -dBATCH -sDEVICE=pdfwrite') env['GSCOM'] = '$GS $GSFLAGS -sOutputFile=$TARGET $SOURCES' diff --git a/engine/SCons/Tool/hpc++.py b/engine/SCons/Tool/hpc++.py index 94b7fec..4920cff 100644 --- a/engine/SCons/Tool/hpc++.py +++ b/engine/SCons/Tool/hpc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hpc++.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/hpc++.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/hpcc.py b/engine/SCons/Tool/hpcc.py index efd5230..bb745ba 100644 --- a/engine/SCons/Tool/hpcc.py +++ b/engine/SCons/Tool/hpcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/hpcc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/hpcc.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/hplink.py b/engine/SCons/Tool/hplink.py index 627c9e9..ea979f5 100644 --- a/engine/SCons/Tool/hplink.py +++ b/engine/SCons/Tool/hplink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/hplink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/hplink.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/icc.py b/engine/SCons/Tool/icc.py index aa54a0a..ac0629c 100644 --- a/engine/SCons/Tool/icc.py +++ b/engine/SCons/Tool/icc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/icc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/icc.py 2014/03/02 14:18:15 garyo" import cc diff --git a/engine/SCons/Tool/icl.py b/engine/SCons/Tool/icl.py index f0a252b..518a902 100644 --- a/engine/SCons/Tool/icl.py +++ b/engine/SCons/Tool/icl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/icl.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/icl.py 2014/03/02 14:18:15 garyo" import SCons.Tool.intelc diff --git a/engine/SCons/Tool/ifl.py b/engine/SCons/Tool/ifl.py index 678a0d1..6e52fca 100644 --- a/engine/SCons/Tool/ifl.py +++ b/engine/SCons/Tool/ifl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ifl.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/ifl.py 2014/03/02 14:18:15 garyo" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/engine/SCons/Tool/ifort.py b/engine/SCons/Tool/ifort.py index 80c170b..c61dc12 100644 --- a/engine/SCons/Tool/ifort.py +++ b/engine/SCons/Tool/ifort.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ifort.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/ifort.py 2014/03/02 14:18:15 garyo" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/engine/SCons/Tool/ilink.py b/engine/SCons/Tool/ilink.py index 7fa9b33..7cd94d7 100644 --- a/engine/SCons/Tool/ilink.py +++ b/engine/SCons/Tool/ilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/ilink.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/ilink32.py b/engine/SCons/Tool/ilink32.py index 8b9cef6..c8a49db 100644 --- a/engine/SCons/Tool/ilink32.py +++ b/engine/SCons/Tool/ilink32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink32.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/ilink32.py 2014/03/02 14:18:15 garyo" import SCons.Tool import SCons.Tool.bcc32 diff --git a/engine/SCons/Tool/install.py b/engine/SCons/Tool/install.py index 6f67fac..8c32650 100644 --- a/engine/SCons/Tool/install.py +++ b/engine/SCons/Tool/install.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/install.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/install.py 2014/03/02 14:18:15 garyo" import os import re @@ -133,6 +133,11 @@ def copyFuncVersionedLib(dest, source, env): if os.path.isdir(source): raise SCons.Errors.UserError("cannot install directory `%s' as a version library" % str(source) ) else: + # remove the link if it is already there + try: + os.remove(dest) + except: + pass shutil.copy2(source, dest) st = os.stat(source) os.chmod(dest, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE) @@ -196,11 +201,34 @@ def versionedLibLinks(dest, source, env): if version != None: # libname includes the version number if one was given linknames = SCons.Tool.VersionShLibLinkNames(version,libname,env) - for linkname in linknames: - if Verbose: - print "make link of %s to %s" %(libname, os.path.join(install_dir, linkname)) + if Verbose: + print "versionedLibLinks: linknames ",linknames + # Here we just need the file name w/o path as the target of the link + lib_ver = libname + # make symlink of adjacent names in linknames + for count in range(len(linknames)): + linkname = linknames[count] fulllinkname = os.path.join(install_dir, linkname) - os.symlink(libname,fulllinkname) + if Verbose: + print "full link name ",fulllinkname + if count > 0: + try: + os.remove(lastlinkname) + except: + pass + os.symlink(os.path.basename(fulllinkname),lastlinkname) + if Verbose: + print "versionedLibLinks: made sym link of %s -> %s" % (lastlinkname,os.path.basename(fulllinkname)) + lastlinkname = fulllinkname + # finish chain of sym links with link to the actual library + if len(linknames)>0: + try: + os.remove(lastlinkname) + except: + pass + os.symlink(lib_ver,lastlinkname) + if Verbose: + print "versionedLibLinks: made sym link of %s -> %s" % (lib_ver,lastlinkname) return def installFunc(target, source, env): @@ -269,6 +297,8 @@ def add_versioned_targets_to_INSTALLED_FILES(target, source, env): global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES Verbose = False _INSTALLED_FILES.extend(target) + if Verbose: + print "ver lib emitter ",repr(target) # see if we have a versioned shared library, if so generate side effects version, libname, install_dir = versionedLibVersion(target[0].path, env) @@ -281,6 +311,9 @@ def add_versioned_targets_to_INSTALLED_FILES(target, source, env): fulllinkname = os.path.join(install_dir, linkname) env.SideEffect(fulllinkname,target[0]) env.Clean(target[0],fulllinkname) + _INSTALLED_FILES.append(fulllinkname) + if Verbose: + print "installed list ", _INSTALLED_FILES _UNIQUE_INSTALLED_FILES = None return (target, source) diff --git a/engine/SCons/Tool/intelc.py b/engine/SCons/Tool/intelc.py index 5d267ff..1bd799f 100644 --- a/engine/SCons/Tool/intelc.py +++ b/engine/SCons/Tool/intelc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import division -__revision__ = "src/engine/SCons/Tool/intelc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/intelc.py 2014/03/02 14:18:15 garyo" import math, sys, os.path, glob, string, re @@ -317,7 +317,7 @@ def get_intel_compiler_top(version, abi): for d in glob.glob('/opt/intel/composerxe-*'): # Typical dir here is /opt/intel/composerxe-2011.4.184 m = re.search(r'([0-9][0-9.]*)$', d) - if m and m.group(1) == verison and \ + if m and m.group(1) == version and \ (os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or os.path.exists(os.path.join(d, "bin", "intel64", "icc"))): top = d diff --git a/engine/SCons/Tool/ipkg.py b/engine/SCons/Tool/ipkg.py index 2abc0e6..3fb58db 100644 --- a/engine/SCons/Tool/ipkg.py +++ b/engine/SCons/Tool/ipkg.py @@ -11,7 +11,7 @@ packages fake_root. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -33,7 +33,7 @@ packages fake_root. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ipkg.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/ipkg.py 2014/03/02 14:18:15 garyo" import os diff --git a/engine/SCons/Tool/jar.py b/engine/SCons/Tool/jar.py index ec8afca..8b5c7f1 100644 --- a/engine/SCons/Tool/jar.py +++ b/engine/SCons/Tool/jar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/jar.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/jar.py 2014/03/02 14:18:15 garyo" import SCons.Subst import SCons.Util diff --git a/engine/SCons/Tool/javac.py b/engine/SCons/Tool/javac.py index a039ace..9249989 100644 --- a/engine/SCons/Tool/javac.py +++ b/engine/SCons/Tool/javac.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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. # 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__ = "src/engine/SCons/Tool/javac.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/javac.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/javah.py b/engine/SCons/Tool/javah.py index 6e8089c..2c2533d 100644 --- a/engine/SCons/Tool/javah.py +++ b/engine/SCons/Tool/javah.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/javah.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/javah.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/latex.py b/engine/SCons/Tool/latex.py index 75033bc..899a508 100644 --- a/engine/SCons/Tool/latex.py +++ b/engine/SCons/Tool/latex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/latex.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/latex.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Defaults diff --git a/engine/SCons/Tool/lex.py b/engine/SCons/Tool/lex.py index 6327730..00e292f 100644 --- a/engine/SCons/Tool/lex.py +++ b/engine/SCons/Tool/lex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/lex.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/lex.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/link.py b/engine/SCons/Tool/link.py index 008a7d7..f6e883f 100644 --- a/engine/SCons/Tool/link.py +++ b/engine/SCons/Tool/link.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/link.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/link.py 2014/03/02 14:18:15 garyo" import re @@ -127,6 +127,18 @@ def shlib_emitter_names(target, source, env): print "shlib_emitter_names: side effect: ", name # add version_name to list of names to be a Side effect version_names.append(version_name) + elif platform == 'cygwin': + shlib_suffix = env.subst('$SHLIBSUFFIX') + name = target[0].name + # generate library name with the version number + suffix_re = re.escape(shlib_suffix) + version_name = re.sub(suffix_re, '-' + re.sub('\.', '-', version) + shlib_suffix, name) + if Verbose: + print "shlib_emitter_names: target is ", version_name + print "shlib_emitter_names: side effect: ", name + # add version_name to list of names to be a Side effect + version_names.append(version_name) + except KeyError: version = None return version_names diff --git a/engine/SCons/Tool/linkloc.py b/engine/SCons/Tool/linkloc.py index 6fdd4da..9f5a6dc 100644 --- a/engine/SCons/Tool/linkloc.py +++ b/engine/SCons/Tool/linkloc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/linkloc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/linkloc.py 2014/03/02 14:18:15 garyo" import os.path import re diff --git a/engine/SCons/Tool/m4.py b/engine/SCons/Tool/m4.py index dfef659..5088b58 100644 --- a/engine/SCons/Tool/m4.py +++ b/engine/SCons/Tool/m4.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/m4.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/m4.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/masm.py b/engine/SCons/Tool/masm.py index b7fb94e..178584d 100644 --- a/engine/SCons/Tool/masm.py +++ b/engine/SCons/Tool/masm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/masm.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/masm.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/midl.py b/engine/SCons/Tool/midl.py index a69406d..e5a871f 100644 --- a/engine/SCons/Tool/midl.py +++ b/engine/SCons/Tool/midl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/midl.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/midl.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/mingw.py b/engine/SCons/Tool/mingw.py index a81c94c..46ca9e4 100644 --- a/engine/SCons/Tool/mingw.py +++ b/engine/SCons/Tool/mingw.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mingw.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/mingw.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/msgfmt.py b/engine/SCons/Tool/msgfmt.py index d444ae2..b831738 100644 --- a/engine/SCons/Tool/msgfmt.py +++ b/engine/SCons/Tool/msgfmt.py @@ -1,6 +1,6 @@ """ msgfmt tool """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ # 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__ = "src/engine/SCons/Tool/msgfmt.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/msgfmt.py 2014/03/02 14:18:15 garyo" from SCons.Builder import BuilderBase ############################################################################# diff --git a/engine/SCons/Tool/msginit.py b/engine/SCons/Tool/msginit.py index fcbd564..d745dc5 100644 --- a/engine/SCons/Tool/msginit.py +++ b/engine/SCons/Tool/msginit.py @@ -3,7 +3,7 @@ Tool specific initialization of msginit tool. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -24,7 +24,7 @@ Tool specific initialization of msginit tool. # 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__ = "src/engine/SCons/Tool/msginit.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/msginit.py 2014/03/02 14:18:15 garyo" import SCons.Warnings import SCons.Builder diff --git a/engine/SCons/Tool/msgmerge.py b/engine/SCons/Tool/msgmerge.py index 35315f9..e50824e 100644 --- a/engine/SCons/Tool/msgmerge.py +++ b/engine/SCons/Tool/msgmerge.py @@ -3,7 +3,7 @@ Tool specific initialization for `msgmerge` tool. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -24,7 +24,7 @@ Tool specific initialization for `msgmerge` tool. # 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__ = "src/engine/SCons/Tool/msgmerge.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/msgmerge.py 2014/03/02 14:18:15 garyo" ############################################################################# def _update_or_init_po_files(target, source, env): diff --git a/engine/SCons/Tool/mslib.py b/engine/SCons/Tool/mslib.py index b851867..0f95e41 100644 --- a/engine/SCons/Tool/mslib.py +++ b/engine/SCons/Tool/mslib.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslib.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/mslib.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/mslink.py b/engine/SCons/Tool/mslink.py index a35d7da..9374ffe 100644 --- a/engine/SCons/Tool/mslink.py +++ b/engine/SCons/Tool/mslink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/mslink.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/mssdk.py b/engine/SCons/Tool/mssdk.py index 84291bc..6112bff 100644 --- a/engine/SCons/Tool/mssdk.py +++ b/engine/SCons/Tool/mssdk.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/mssdk.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/mssdk.py 2014/03/02 14:18:15 garyo" """engine.SCons.Tool.mssdk diff --git a/engine/SCons/Tool/msvc.py b/engine/SCons/Tool/msvc.py index 552c8ef..e09fe9f 100644 --- a/engine/SCons/Tool/msvc.py +++ b/engine/SCons/Tool/msvc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/msvc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/msvc.py 2014/03/02 14:18:15 garyo" import os.path import re diff --git a/engine/SCons/Tool/msvs.py b/engine/SCons/Tool/msvs.py index 24f3827..6e05b47 100644 --- a/engine/SCons/Tool/msvs.py +++ b/engine/SCons/Tool/msvs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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. # 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__ = "src/engine/SCons/Tool/msvs.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/msvs.py 2014/03/02 14:18:15 garyo" import SCons.compat diff --git a/engine/SCons/Tool/mwcc.py b/engine/SCons/Tool/mwcc.py index 4843301..1f12b48 100644 --- a/engine/SCons/Tool/mwcc.py +++ b/engine/SCons/Tool/mwcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/mwcc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/mwcc.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/mwld.py b/engine/SCons/Tool/mwld.py index ff875a5..649e220 100644 --- a/engine/SCons/Tool/mwld.py +++ b/engine/SCons/Tool/mwld.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/mwld.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/mwld.py 2014/03/02 14:18:15 garyo" import SCons.Tool diff --git a/engine/SCons/Tool/nasm.py b/engine/SCons/Tool/nasm.py index d754a2a..805eeb0 100644 --- a/engine/SCons/Tool/nasm.py +++ b/engine/SCons/Tool/nasm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/nasm.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/nasm.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/packaging/__init__.py b/engine/SCons/Tool/packaging/__init__.py index b0a7549..a356f46 100644 --- a/engine/SCons/Tool/packaging/__init__.py +++ b/engine/SCons/Tool/packaging/__init__.py @@ -4,7 +4,7 @@ SCons Packaging Tool. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -25,7 +25,7 @@ SCons Packaging Tool. # 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__ = "src/engine/SCons/Tool/packaging/__init__.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 2014/03/02 14:18:15 garyo" import SCons.Environment from SCons.Variables import * diff --git a/engine/SCons/Tool/packaging/ipk.py b/engine/SCons/Tool/packaging/ipk.py index 77c6420..c7c2ecb 100644 --- a/engine/SCons/Tool/packaging/ipk.py +++ b/engine/SCons/Tool/packaging/ipk.py @@ -2,7 +2,7 @@ """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 2014/03/02 14:18:15 garyo" import SCons.Builder import SCons.Node.FS diff --git a/engine/SCons/Tool/packaging/msi.py b/engine/SCons/Tool/packaging/msi.py index 26eb630..5c81c2f 100644 --- a/engine/SCons/Tool/packaging/msi.py +++ b/engine/SCons/Tool/packaging/msi.py @@ -4,7 +4,7 @@ The msi packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -25,7 +25,7 @@ The msi packager. # 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__ = "src/engine/SCons/Tool/packaging/msi.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/msi.py 2014/03/02 14:18:15 garyo" import os import SCons diff --git a/engine/SCons/Tool/packaging/rpm.py b/engine/SCons/Tool/packaging/rpm.py index d60166f..049bf45 100644 --- a/engine/SCons/Tool/packaging/rpm.py +++ b/engine/SCons/Tool/packaging/rpm.py @@ -4,7 +4,7 @@ The rpm packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -25,7 +25,7 @@ The rpm packager. # 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__ = "src/engine/SCons/Tool/packaging/rpm.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 2014/03/02 14:18:15 garyo" import os diff --git a/engine/SCons/Tool/packaging/src_tarbz2.py b/engine/SCons/Tool/packaging/src_tarbz2.py index 1da2bec..6a98b38 100644 --- a/engine/SCons/Tool/packaging/src_tarbz2.py +++ b/engine/SCons/Tool/packaging/src_tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -26,7 +26,7 @@ The tarbz2 SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 2014/03/02 14:18:15 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/engine/SCons/Tool/packaging/src_targz.py b/engine/SCons/Tool/packaging/src_targz.py index bde3316..de7d17b 100644 --- a/engine/SCons/Tool/packaging/src_targz.py +++ b/engine/SCons/Tool/packaging/src_targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -26,7 +26,7 @@ The targz SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 2014/03/02 14:18:15 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/engine/SCons/Tool/packaging/src_zip.py b/engine/SCons/Tool/packaging/src_zip.py index e5a752e..86160de 100644 --- a/engine/SCons/Tool/packaging/src_zip.py +++ b/engine/SCons/Tool/packaging/src_zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -26,7 +26,7 @@ The zip SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 2014/03/02 14:18:15 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/engine/SCons/Tool/packaging/tarbz2.py b/engine/SCons/Tool/packaging/tarbz2.py index 0c8e4e7..7df6932 100644 --- a/engine/SCons/Tool/packaging/tarbz2.py +++ b/engine/SCons/Tool/packaging/tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -26,7 +26,7 @@ The tarbz2 SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 2014/03/02 14:18:15 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/engine/SCons/Tool/packaging/targz.py b/engine/SCons/Tool/packaging/targz.py index 32b74cf..6a9024c 100644 --- a/engine/SCons/Tool/packaging/targz.py +++ b/engine/SCons/Tool/packaging/targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -26,7 +26,7 @@ The targz SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/targz.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/targz.py 2014/03/02 14:18:15 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/engine/SCons/Tool/packaging/zip.py b/engine/SCons/Tool/packaging/zip.py index 1f34581..862589c 100644 --- a/engine/SCons/Tool/packaging/zip.py +++ b/engine/SCons/Tool/packaging/zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -26,7 +26,7 @@ The zip SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/zip.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/zip.py 2014/03/02 14:18:15 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/engine/SCons/Tool/pdf.py b/engine/SCons/Tool/pdf.py index 1b68f10..b93891d 100644 --- a/engine/SCons/Tool/pdf.py +++ b/engine/SCons/Tool/pdf.py @@ -6,7 +6,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdf.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/pdf.py 2014/03/02 14:18:15 garyo" import SCons.Builder import SCons.Tool diff --git a/engine/SCons/Tool/pdflatex.py b/engine/SCons/Tool/pdflatex.py index 80756d1..a5ec458 100644 --- a/engine/SCons/Tool/pdflatex.py +++ b/engine/SCons/Tool/pdflatex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdflatex.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/pdflatex.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Util diff --git a/engine/SCons/Tool/pdftex.py b/engine/SCons/Tool/pdftex.py index 34ca325..aa002ad 100644 --- a/engine/SCons/Tool/pdftex.py +++ b/engine/SCons/Tool/pdftex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdftex.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/pdftex.py 2014/03/02 14:18:15 garyo" import os import SCons.Action diff --git a/engine/SCons/Tool/qt.py b/engine/SCons/Tool/qt.py index 96e14b1..22c7770 100644 --- a/engine/SCons/Tool/qt.py +++ b/engine/SCons/Tool/qt.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/qt.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/qt.py 2014/03/02 14:18:15 garyo" import os.path import re diff --git a/engine/SCons/Tool/rmic.py b/engine/SCons/Tool/rmic.py index df90bc0..689d823 100644 --- a/engine/SCons/Tool/rmic.py +++ b/engine/SCons/Tool/rmic.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rmic.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/rmic.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/rpcgen.py b/engine/SCons/Tool/rpcgen.py index 309db82..2caf244 100644 --- a/engine/SCons/Tool/rpcgen.py +++ b/engine/SCons/Tool/rpcgen.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/rpcgen.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/rpcgen.py 2014/03/02 14:18:15 garyo" from SCons.Builder import Builder import SCons.Util diff --git a/engine/SCons/Tool/rpm.py b/engine/SCons/Tool/rpm.py index ef31bd5..9be0d79 100644 --- a/engine/SCons/Tool/rpm.py +++ b/engine/SCons/Tool/rpm.py @@ -11,7 +11,7 @@ tar.gz consisting of the source file and a specfile. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rpm.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/rpm.py 2014/03/02 14:18:15 garyo" import os import re @@ -79,7 +79,7 @@ def build_rpm(target, source, env): errstr=output, filename=str(target[0]) ) else: - # XXX: assume that LC_ALL=c is set while running rpmbuild + # XXX: assume that LC_ALL=C is set while running rpmbuild output_files = re.compile( 'Wrote: (.*)' ).findall( output ) for output, input in zip( output_files, target ): @@ -117,7 +117,7 @@ def generate(env): bld = RpmBuilder env['BUILDERS']['Rpm'] = bld - env.SetDefault(RPM = 'LC_ALL=c rpmbuild') + env.SetDefault(RPM = 'LC_ALL=C rpmbuild') env.SetDefault(RPMFLAGS = SCons.Util.CLVar('-ta')) env.SetDefault(RPMCOM = rpmAction) env.SetDefault(RPMSUFFIX = '.rpm') diff --git a/engine/SCons/Tool/rpmutils.py b/engine/SCons/Tool/rpmutils.py index 16d980a..f482fbb 100644 --- a/engine/SCons/Tool/rpmutils.py +++ b/engine/SCons/Tool/rpmutils.py @@ -14,7 +14,7 @@ exact syntax. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -35,7 +35,7 @@ exact syntax. # 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__ = "src/engine/SCons/Tool/rpmutils.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/rpmutils.py 2014/03/02 14:18:15 garyo" import platform diff --git a/engine/SCons/Tool/sgiar.py b/engine/SCons/Tool/sgiar.py index 27f5f75..a1a94a5 100644 --- a/engine/SCons/Tool/sgiar.py +++ b/engine/SCons/Tool/sgiar.py @@ -11,7 +11,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -33,7 +33,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgiar.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sgiar.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/sgic++.py b/engine/SCons/Tool/sgic++.py index ae2ac2c..4dcdc1d 100644 --- a/engine/SCons/Tool/sgic++.py +++ b/engine/SCons/Tool/sgic++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgic++.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sgic++.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/sgicc.py b/engine/SCons/Tool/sgicc.py index 54e05a3..15c34c1 100644 --- a/engine/SCons/Tool/sgicc.py +++ b/engine/SCons/Tool/sgicc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgicc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sgicc.py 2014/03/02 14:18:15 garyo" import cc diff --git a/engine/SCons/Tool/sgilink.py b/engine/SCons/Tool/sgilink.py index 82c4419..10069c6 100644 --- a/engine/SCons/Tool/sgilink.py +++ b/engine/SCons/Tool/sgilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgilink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sgilink.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/sunar.py b/engine/SCons/Tool/sunar.py index 3a4d7c2..154e44f 100644 --- a/engine/SCons/Tool/sunar.py +++ b/engine/SCons/Tool/sunar.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunar.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sunar.py 2014/03/02 14:18:15 garyo" import SCons.Defaults import SCons.Tool diff --git a/engine/SCons/Tool/sunc++.py b/engine/SCons/Tool/sunc++.py index 7234239..2f1ceaf 100644 --- a/engine/SCons/Tool/sunc++.py +++ b/engine/SCons/Tool/sunc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunc++.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sunc++.py 2014/03/02 14:18:15 garyo" import SCons diff --git a/engine/SCons/Tool/suncc.py b/engine/SCons/Tool/suncc.py index f7442d8..67edb8a 100644 --- a/engine/SCons/Tool/suncc.py +++ b/engine/SCons/Tool/suncc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/suncc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/suncc.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/sunf77.py b/engine/SCons/Tool/sunf77.py index eb63781..5eb664d 100644 --- a/engine/SCons/Tool/sunf77.py +++ b/engine/SCons/Tool/sunf77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf77.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sunf77.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/sunf90.py b/engine/SCons/Tool/sunf90.py index cfee2ee..0a08c70 100644 --- a/engine/SCons/Tool/sunf90.py +++ b/engine/SCons/Tool/sunf90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf90.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sunf90.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/sunf95.py b/engine/SCons/Tool/sunf95.py index 31d57b1..fd0be66 100644 --- a/engine/SCons/Tool/sunf95.py +++ b/engine/SCons/Tool/sunf95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf95.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sunf95.py 2014/03/02 14:18:15 garyo" import SCons.Util diff --git a/engine/SCons/Tool/sunlink.py b/engine/SCons/Tool/sunlink.py index 4639341..5cc6024 100644 --- a/engine/SCons/Tool/sunlink.py +++ b/engine/SCons/Tool/sunlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/sunlink.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/sunlink.py 2014/03/02 14:18:15 garyo" import os import os.path diff --git a/engine/SCons/Tool/swig.py b/engine/SCons/Tool/swig.py index 6bbe922..188d229 100644 --- a/engine/SCons/Tool/swig.py +++ b/engine/SCons/Tool/swig.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/swig.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/swig.py 2014/03/02 14:18:15 garyo" import os.path import re diff --git a/engine/SCons/Tool/tar.py b/engine/SCons/Tool/tar.py index e289358..9c09f0e 100644 --- a/engine/SCons/Tool/tar.py +++ b/engine/SCons/Tool/tar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tar.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/tar.py 2014/03/02 14:18:15 garyo" import SCons.Action import SCons.Builder diff --git a/engine/SCons/Tool/tex.py b/engine/SCons/Tool/tex.py index 5960634..515002c 100644 --- a/engine/SCons/Tool/tex.py +++ b/engine/SCons/Tool/tex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tex.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/tex.py 2014/03/02 14:18:15 garyo" import os.path import re diff --git a/engine/SCons/Tool/textfile.py b/engine/SCons/Tool/textfile.py index 5e8307b..048b0f0 100644 --- a/engine/SCons/Tool/textfile.py +++ b/engine/SCons/Tool/textfile.py @@ -1,6 +1,6 @@ # -*- python -*- # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -44,7 +44,7 @@ Textfile/Substfile builder for SCons. is unpredictible whether the expansion will occur. """ -__revision__ = "src/engine/SCons/Tool/textfile.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/textfile.py 2014/03/02 14:18:15 garyo" import SCons diff --git a/engine/SCons/Tool/tlib.py b/engine/SCons/Tool/tlib.py index 5a30712..834d5d5 100644 --- a/engine/SCons/Tool/tlib.py +++ b/engine/SCons/Tool/tlib.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tlib.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/tlib.py 2014/03/02 14:18:15 garyo" import SCons.Tool import SCons.Tool.bcc32 diff --git a/engine/SCons/Tool/wix.py b/engine/SCons/Tool/wix.py index 5b4c606..1cc2ef2 100644 --- a/engine/SCons/Tool/wix.py +++ b/engine/SCons/Tool/wix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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/Tool/wix.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/wix.py 2014/03/02 14:18:15 garyo" import SCons.Builder import SCons.Action diff --git a/engine/SCons/Tool/xgettext.py b/engine/SCons/Tool/xgettext.py index 6de021a..3224ec9 100644 --- a/engine/SCons/Tool/xgettext.py +++ b/engine/SCons/Tool/xgettext.py @@ -3,7 +3,7 @@ Tool specific initialization of `xgettext` tool. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -24,7 +24,7 @@ Tool specific initialization of `xgettext` tool. # 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__ = "src/engine/SCons/Tool/xgettext.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/xgettext.py 2014/03/02 14:18:15 garyo" ############################################################################# class _CmdRunner(object): diff --git a/engine/SCons/Tool/yacc.py b/engine/SCons/Tool/yacc.py index 1934181..15aca39 100644 --- a/engine/SCons/Tool/yacc.py +++ b/engine/SCons/Tool/yacc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/yacc.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/yacc.py 2014/03/02 14:18:15 garyo" import os.path diff --git a/engine/SCons/Tool/zip.py b/engine/SCons/Tool/zip.py index 86ae55e..8a914cf 100644 --- a/engine/SCons/Tool/zip.py +++ b/engine/SCons/Tool/zip.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/zip.py 2013/03/03 09:48:35 garyo" +__revision__ = "src/engine/SCons/Tool/zip.py 2014/03/02 14:18:15 garyo" import os.path @@ -57,9 +57,9 @@ if internal_zip: for fname in filenames: path = os.path.join(dirpath, fname) if os.path.isfile(path): - zf.write(path) + zf.write(path, os.path.relpath(path, str(env.get('ZIPROOT', '')))) else: - zf.write(str(s)) + zf.write(str(s), os.path.relpath(str(s), str(env.get('ZIPROOT', '')))) zf.close() else: zipcompression = 0 @@ -88,6 +88,7 @@ def generate(env): env['ZIPCOM'] = zipAction env['ZIPCOMPRESSION'] = zipcompression env['ZIPSUFFIX'] = '.zip' + env['ZIPROOT'] = SCons.Util.CLVar('') def exists(env): return internal_zip or env.Detect('zip') |