upgrade scons to 2.3.4
This commit is contained in:
parent
2572568f29
commit
f8b8eb1c52
204 changed files with 1343 additions and 875 deletions
|
@ -3,7 +3,7 @@
|
||||||
This copyright and license do not apply to any other software
|
This copyright and license do not apply to any other software
|
||||||
with which this software may have been included.
|
with which this software may have been included.
|
||||||
|
|
||||||
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
|
|
||||||
SCons - a software construction tool
|
SCons - a software construction tool
|
||||||
|
|
||||||
|
|
|
@ -1,240 +0,0 @@
|
||||||
"""SCons.Tool.dmd
|
|
||||||
|
|
||||||
Tool-specific initialization for the Digital Mars D compiler.
|
|
||||||
(http://digitalmars.com/d)
|
|
||||||
|
|
||||||
Coded by Andy Friesen (andy@ikagames.com)
|
|
||||||
15 November 2003
|
|
||||||
|
|
||||||
Amended by Russel Winder (russel@russel.org.uk)
|
|
||||||
2010-02-07
|
|
||||||
|
|
||||||
There are a number of problems with this script at this point in time.
|
|
||||||
The one that irritates me the most is the Windows linker setup. The D
|
|
||||||
linker doesn't have a way to add lib paths on the commandline, as far
|
|
||||||
as I can see. You have to specify paths relative to the SConscript or
|
|
||||||
use absolute paths. To hack around it, add '#/blah'. This will link
|
|
||||||
blah.lib from the directory where SConstruct resides.
|
|
||||||
|
|
||||||
Compiler variables:
|
|
||||||
DC - The name of the D compiler to use. Defaults to dmd or gdmd,
|
|
||||||
whichever is found.
|
|
||||||
DPATH - List of paths to search for import modules.
|
|
||||||
DVERSIONS - List of version tags to enable when compiling.
|
|
||||||
DDEBUG - List of debug tags to enable when compiling.
|
|
||||||
|
|
||||||
Linker related variables:
|
|
||||||
LIBS - List of library files to link in.
|
|
||||||
DLINK - Name of the linker to use. Defaults to dmd or gdmd.
|
|
||||||
DLINKFLAGS - List of linker flags.
|
|
||||||
|
|
||||||
Lib tool variables:
|
|
||||||
DLIB - Name of the lib tool to use. Defaults to lib.
|
|
||||||
DLIBFLAGS - List of flags to pass to the lib tool.
|
|
||||||
LIBS - Same as for the linker. (libraries to pull into the .lib)
|
|
||||||
"""
|
|
||||||
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# "Software"), to deal in the Software without restriction, including
|
|
||||||
# without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
# permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
# the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included
|
|
||||||
# in all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
||||||
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
||||||
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/dmd.py 2014/03/02 14:18:15 garyo"
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
import SCons.Action
|
|
||||||
import SCons.Builder
|
|
||||||
import SCons.Defaults
|
|
||||||
import SCons.Scanner.D
|
|
||||||
import SCons.Tool
|
|
||||||
|
|
||||||
# Adapted from c++.py
|
|
||||||
def isD(source):
|
|
||||||
if not source:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
for s in source:
|
|
||||||
if s.sources:
|
|
||||||
ext = os.path.splitext(str(s.sources[0]))[1]
|
|
||||||
if ext == '.d':
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
smart_link = {}
|
|
||||||
|
|
||||||
smart_lib = {}
|
|
||||||
|
|
||||||
def generate(env):
|
|
||||||
global smart_link
|
|
||||||
global smart_lib
|
|
||||||
|
|
||||||
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
|
|
||||||
|
|
||||||
DAction = SCons.Action.Action('$DCOM', '$DCOMSTR')
|
|
||||||
|
|
||||||
static_obj.add_action('.d', DAction)
|
|
||||||
shared_obj.add_action('.d', DAction)
|
|
||||||
static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter)
|
|
||||||
shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter)
|
|
||||||
|
|
||||||
dc = env.Detect(['dmd', 'gdmd'])
|
|
||||||
env['DC'] = dc
|
|
||||||
env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of$TARGET $SOURCES'
|
|
||||||
env['_DINCFLAGS'] = '$( ${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
|
|
||||||
env['_DVERFLAGS'] = '$( ${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)} $)'
|
|
||||||
env['_DDEBUGFLAGS'] = '$( ${_concat(DDEBUGPREFIX, DDEBUG, DDEBUGSUFFIX, __env__)} $)'
|
|
||||||
env['_DFLAGS'] = '$( ${_concat(DFLAGPREFIX, DFLAGS, DFLAGSUFFIX, __env__)} $)'
|
|
||||||
|
|
||||||
env['DPATH'] = ['#/']
|
|
||||||
env['DFLAGS'] = []
|
|
||||||
env['DVERSIONS'] = []
|
|
||||||
env['DDEBUG'] = []
|
|
||||||
|
|
||||||
if dc:
|
|
||||||
# Add the path to the standard library.
|
|
||||||
# This is merely for the convenience of the dependency scanner.
|
|
||||||
dmd_path = env.WhereIs(dc)
|
|
||||||
if dmd_path:
|
|
||||||
x = dmd_path.rindex(dc)
|
|
||||||
phobosDir = dmd_path[:x] + '/../src/phobos'
|
|
||||||
if os.path.isdir(phobosDir):
|
|
||||||
env.Append(DPATH = [phobosDir])
|
|
||||||
|
|
||||||
env['DINCPREFIX'] = '-I'
|
|
||||||
env['DINCSUFFIX'] = ''
|
|
||||||
env['DVERPREFIX'] = '-version='
|
|
||||||
env['DVERSUFFIX'] = ''
|
|
||||||
env['DDEBUGPREFIX'] = '-debug='
|
|
||||||
env['DDEBUGSUFFIX'] = ''
|
|
||||||
env['DFLAGPREFIX'] = '-'
|
|
||||||
env['DFLAGSUFFIX'] = ''
|
|
||||||
env['DFILESUFFIX'] = '.d'
|
|
||||||
|
|
||||||
# Need to use the Digital Mars linker/lib on windows.
|
|
||||||
# *nix can just use GNU link.
|
|
||||||
if env['PLATFORM'] == 'win32':
|
|
||||||
env['DLINK'] = '$DC'
|
|
||||||
env['DLINKCOM'] = '$DLINK -of$TARGET $SOURCES $DFLAGS $DLINKFLAGS $_DLINKLIBFLAGS'
|
|
||||||
env['DLIB'] = 'lib'
|
|
||||||
env['DLIBCOM'] = '$DLIB $_DLIBFLAGS -c $TARGET $SOURCES $_DLINKLIBFLAGS'
|
|
||||||
|
|
||||||
env['_DLINKLIBFLAGS'] = '$( ${_concat(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
|
|
||||||
env['_DLIBFLAGS'] = '$( ${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)} $)'
|
|
||||||
env['DLINKFLAGS'] = []
|
|
||||||
env['DLIBLINKPREFIX'] = ''
|
|
||||||
env['DLIBLINKSUFFIX'] = '.lib'
|
|
||||||
env['DLIBFLAGPREFIX'] = '-'
|
|
||||||
env['DLIBFLAGSUFFIX'] = ''
|
|
||||||
env['DLINKFLAGPREFIX'] = '-'
|
|
||||||
env['DLINKFLAGSUFFIX'] = ''
|
|
||||||
|
|
||||||
SCons.Tool.createStaticLibBuilder(env)
|
|
||||||
|
|
||||||
# Basically, we hijack the link and ar builders with our own.
|
|
||||||
# these builders check for the presence of D source, and swap out
|
|
||||||
# the system's defaults for the Digital Mars tools. If there's no D
|
|
||||||
# source, then we silently return the previous settings.
|
|
||||||
linkcom = env.get('LINKCOM')
|
|
||||||
try:
|
|
||||||
env['SMART_LINKCOM'] = smart_link[linkcom]
|
|
||||||
except KeyError:
|
|
||||||
def _smartLink(source, target, env, for_signature,
|
|
||||||
defaultLinker=linkcom):
|
|
||||||
if isD(source):
|
|
||||||
# XXX I'm not sure how to add a $DLINKCOMSTR variable
|
|
||||||
# so that it works with this _smartLink() logic,
|
|
||||||
# and I don't have a D compiler/linker to try it out,
|
|
||||||
# so we'll leave it alone for now.
|
|
||||||
return '$DLINKCOM'
|
|
||||||
else:
|
|
||||||
return defaultLinker
|
|
||||||
env['SMART_LINKCOM'] = smart_link[linkcom] = _smartLink
|
|
||||||
|
|
||||||
arcom = env.get('ARCOM')
|
|
||||||
try:
|
|
||||||
env['SMART_ARCOM'] = smart_lib[arcom]
|
|
||||||
except KeyError:
|
|
||||||
def _smartLib(source, target, env, for_signature,
|
|
||||||
defaultLib=arcom):
|
|
||||||
if isD(source):
|
|
||||||
# XXX I'm not sure how to add a $DLIBCOMSTR variable
|
|
||||||
# so that it works with this _smartLib() logic, and
|
|
||||||
# I don't have a D compiler/archiver to try it out,
|
|
||||||
# so we'll leave it alone for now.
|
|
||||||
return '$DLIBCOM'
|
|
||||||
else:
|
|
||||||
return defaultLib
|
|
||||||
env['SMART_ARCOM'] = smart_lib[arcom] = _smartLib
|
|
||||||
|
|
||||||
# It is worth noting that the final space in these strings is
|
|
||||||
# absolutely pivotal. SCons sees these as actions and not generators
|
|
||||||
# if it is not there. (very bad)
|
|
||||||
env['ARCOM'] = '$SMART_ARCOM '
|
|
||||||
env['LINKCOM'] = '$SMART_LINKCOM '
|
|
||||||
else: # assuming linux
|
|
||||||
linkcom = env.get('LINKCOM')
|
|
||||||
try:
|
|
||||||
env['SMART_LINKCOM'] = smart_link[linkcom]
|
|
||||||
except KeyError:
|
|
||||||
def _smartLink(source, target, env, for_signature,
|
|
||||||
defaultLinker=linkcom, dc=dc):
|
|
||||||
if isD(source):
|
|
||||||
try:
|
|
||||||
libs = env['LIBS']
|
|
||||||
except KeyError:
|
|
||||||
libs = []
|
|
||||||
if dc == 'dmd':
|
|
||||||
# TODO: This assumes that the dmd executable is in the
|
|
||||||
# bin directory and that the libraries are in a peer
|
|
||||||
# directory lib. This true of the Digital Mars
|
|
||||||
# distribution but . . .
|
|
||||||
import glob
|
|
||||||
dHome = env.WhereIs(dc).replace('/dmd' , '/..')
|
|
||||||
if glob.glob(dHome + '/lib/*phobos2*'):
|
|
||||||
if 'phobos2' not in libs:
|
|
||||||
env.Append(LIBPATH = [dHome + '/lib'])
|
|
||||||
env.Append(LIBS = ['phobos2'])
|
|
||||||
# TODO: Find out when there will be a
|
|
||||||
# 64-bit version of D.
|
|
||||||
env.Append(LINKFLAGS = ['-m32'])
|
|
||||||
else:
|
|
||||||
if 'phobos' not in libs:
|
|
||||||
env.Append(LIBS = ['phobos'])
|
|
||||||
elif dc is 'gdmd':
|
|
||||||
env.Append(LIBS = ['gphobos'])
|
|
||||||
if 'pthread' not in libs:
|
|
||||||
env.Append(LIBS = ['pthread'])
|
|
||||||
if 'm' not in libs:
|
|
||||||
env.Append(LIBS = ['m'])
|
|
||||||
return defaultLinker
|
|
||||||
env['SMART_LINKCOM'] = smart_link[linkcom] = _smartLink
|
|
||||||
|
|
||||||
env['LINKCOM'] = '$SMART_LINKCOM '
|
|
||||||
|
|
||||||
def exists(env):
|
|
||||||
return env.Detect(['dmd', 'gdmd'])
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# tab-width:4
|
|
||||||
# indent-tabs-mode:nil
|
|
||||||
# End:
|
|
||||||
# vim: set expandtab tabstop=4 shiftwidth=4:
|
|
|
@ -76,7 +76,7 @@ way for wrapping up the functions.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -97,7 +97,7 @@ way for wrapping up the functions.
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Action.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Action.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.compat
|
import SCons.compat
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ def _do_create_keywords(args, kw):
|
||||||
'You must either pass a string or a callback which '
|
'You must either pass a string or a callback which '
|
||||||
'accepts (target, source, env) as parameters.')
|
'accepts (target, source, env) as parameters.')
|
||||||
if len(args) > 1:
|
if len(args) > 1:
|
||||||
kw['varlist'] = args[1:] + kw['varlist']
|
kw['varlist'] = tuple(SCons.Util.flatten(args[1:])) + kw['varlist']
|
||||||
if kw.get('strfunction', _null) is not _null \
|
if kw.get('strfunction', _null) is not _null \
|
||||||
and kw.get('cmdstr', _null) is not _null:
|
and kw.get('cmdstr', _null) is not _null:
|
||||||
raise SCons.Errors.UserError(
|
raise SCons.Errors.UserError(
|
||||||
|
@ -679,12 +679,13 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw):
|
||||||
# return a dummy Popen instance that only returns error
|
# return a dummy Popen instance that only returns error
|
||||||
class dummyPopen(object):
|
class dummyPopen(object):
|
||||||
def __init__(self, e): self.exception = e
|
def __init__(self, e): self.exception = e
|
||||||
def communicate(self): return ('','')
|
def communicate(self,input=None): return ('','')
|
||||||
def wait(self): return -self.exception.errno
|
def wait(self): return -self.exception.errno
|
||||||
stdin = None
|
stdin = None
|
||||||
class f(object):
|
class f(object):
|
||||||
def read(self): return ''
|
def read(self): return ''
|
||||||
def readline(self): return ''
|
def readline(self): return ''
|
||||||
|
def __iter__(self): return iter(())
|
||||||
stdout = stderr = f()
|
stdout = stderr = f()
|
||||||
return dummyPopen(e)
|
return dummyPopen(e)
|
||||||
|
|
|
@ -76,7 +76,7 @@ There are the following methods for internal use within this module:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -97,7 +97,7 @@ There are the following methods for internal use within this module:
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Builder.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Builder.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/CacheDir.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/CacheDir.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """
|
__doc__ = """
|
||||||
CacheDir support
|
CacheDir support
|
|
@ -6,7 +6,7 @@ needed by most users.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -28,7 +28,7 @@ needed by most users.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Debug.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Debug.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
|
@ -10,7 +10,7 @@ from distutils.msvccompiler.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -33,7 +33,7 @@ from distutils.msvccompiler.
|
||||||
#
|
#
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Defaults.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Defaults.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -144,6 +144,9 @@ ShCAction = SCons.Action.Action("$SHCCCOM", "$SHCCCOMSTR")
|
||||||
CXXAction = SCons.Action.Action("$CXXCOM", "$CXXCOMSTR")
|
CXXAction = SCons.Action.Action("$CXXCOM", "$CXXCOMSTR")
|
||||||
ShCXXAction = SCons.Action.Action("$SHCXXCOM", "$SHCXXCOMSTR")
|
ShCXXAction = SCons.Action.Action("$SHCXXCOM", "$SHCXXCOMSTR")
|
||||||
|
|
||||||
|
DAction = SCons.Action.Action("$DCOM", "$DCOMSTR")
|
||||||
|
ShDAction = SCons.Action.Action("$SHDCOM", "$SHDCOMSTR")
|
||||||
|
|
||||||
ASAction = SCons.Action.Action("$ASCOM", "$ASCOMSTR")
|
ASAction = SCons.Action.Action("$ASCOM", "$ASCOMSTR")
|
||||||
ASPPAction = SCons.Action.Action("$ASPPCOM", "$ASPPCOMSTR")
|
ASPPAction = SCons.Action.Action("$ASPPCOM", "$ASPPCOMSTR")
|
||||||
|
|
||||||
|
@ -178,20 +181,37 @@ def chmod_strfunc(dest, mode):
|
||||||
|
|
||||||
Chmod = ActionFactory(chmod_func, chmod_strfunc)
|
Chmod = ActionFactory(chmod_func, chmod_strfunc)
|
||||||
|
|
||||||
def copy_func(dest, src):
|
def copy_func(dest, src, symlinks=True):
|
||||||
|
"""
|
||||||
|
If symlinks (is true), then a symbolic link will be
|
||||||
|
shallow copied and recreated as a symbolic link; otherwise, copying
|
||||||
|
a symbolic link will be equivalent to copying the symbolic link's
|
||||||
|
final target regardless of symbolic link depth.
|
||||||
|
"""
|
||||||
|
|
||||||
|
dest = str(dest)
|
||||||
|
src = str(src)
|
||||||
|
|
||||||
SCons.Node.FS.invalidate_node_memos(dest)
|
SCons.Node.FS.invalidate_node_memos(dest)
|
||||||
if SCons.Util.is_List(src) and os.path.isdir(dest):
|
if SCons.Util.is_List(src) and os.path.isdir(dest):
|
||||||
for file in src:
|
for file in src:
|
||||||
shutil.copy2(file, dest)
|
shutil.copy2(file, dest)
|
||||||
return 0
|
return 0
|
||||||
|
elif os.path.islink(src):
|
||||||
|
linkto = os.readlink(src)
|
||||||
|
if symlinks:
|
||||||
|
return os.symlink(linkto, dest)
|
||||||
|
else:
|
||||||
|
return copy_func(dest, linkto, symlinks)
|
||||||
elif os.path.isfile(src):
|
elif os.path.isfile(src):
|
||||||
return shutil.copy2(src, dest)
|
return shutil.copy2(src, dest)
|
||||||
else:
|
else:
|
||||||
return shutil.copytree(src, dest, 1)
|
return shutil.copytree(src, dest, symlinks)
|
||||||
|
|
||||||
Copy = ActionFactory(copy_func,
|
Copy = ActionFactory(
|
||||||
lambda dest, src: 'Copy("%s", "%s")' % (dest, src),
|
copy_func,
|
||||||
convert=str)
|
lambda dest, src, symlinks=True: 'Copy("%s", "%s")' % (dest, src)
|
||||||
|
)
|
||||||
|
|
||||||
def delete_func(dest, must_exist=0):
|
def delete_func(dest, must_exist=0):
|
||||||
SCons.Node.FS.invalidate_node_memos(dest)
|
SCons.Node.FS.invalidate_node_memos(dest)
|
||||||
|
@ -321,7 +341,7 @@ def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
|
||||||
where it finds them. This is used by tools (like the GNU linker)
|
where it finds them. This is used by tools (like the GNU linker)
|
||||||
that need to turn something like 'libfoo.a' into '-lfoo'.
|
that need to turn something like 'libfoo.a' into '-lfoo'.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not itms:
|
if not itms:
|
||||||
return itms
|
return itms
|
||||||
|
|
||||||
|
@ -335,7 +355,7 @@ def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
|
||||||
c = env_c
|
c = env_c
|
||||||
else:
|
else:
|
||||||
c = _concat_ixes
|
c = _concat_ixes
|
||||||
|
|
||||||
stripprefixes = list(map(env.subst, SCons.Util.flatten(stripprefixes)))
|
stripprefixes = list(map(env.subst, SCons.Util.flatten(stripprefixes)))
|
||||||
stripsuffixes = list(map(env.subst, SCons.Util.flatten(stripsuffixes)))
|
stripsuffixes = list(map(env.subst, SCons.Util.flatten(stripsuffixes)))
|
||||||
|
|
||||||
|
@ -413,7 +433,7 @@ def _defines(prefix, defs, suffix, env, c=_concat_ixes):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return c(prefix, env.subst_path(processDefines(defs)), suffix, env)
|
return c(prefix, env.subst_path(processDefines(defs)), suffix, env)
|
||||||
|
|
||||||
class NullCmdGenerator(object):
|
class NullCmdGenerator(object):
|
||||||
"""This is a callable class that can be used in place of other
|
"""This is a callable class that can be used in place of other
|
||||||
command generators if you don't want them to do anything.
|
command generators if you don't want them to do anything.
|
||||||
|
@ -449,7 +469,7 @@ class Variable_Method_Caller(object):
|
||||||
self.method = method
|
self.method = method
|
||||||
def __call__(self, *args, **kw):
|
def __call__(self, *args, **kw):
|
||||||
try: 1//0
|
try: 1//0
|
||||||
except ZeroDivisionError:
|
except ZeroDivisionError:
|
||||||
# Don't start iterating with the current stack-frame to
|
# Don't start iterating with the current stack-frame to
|
||||||
# prevent creating reference cycles (f_back is safe).
|
# prevent creating reference cycles (f_back is safe).
|
||||||
frame = sys.exc_info()[2].tb_frame.f_back
|
frame = sys.exc_info()[2].tb_frame.f_back
|
|
@ -10,7 +10,7 @@ Environment
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -31,7 +31,7 @@ Environment
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Environment.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Environment.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
@ -1206,7 +1206,13 @@ class Base(SubstitutionEnvironment):
|
||||||
# based on what we think the value looks like.
|
# based on what we think the value looks like.
|
||||||
if SCons.Util.is_List(val):
|
if SCons.Util.is_List(val):
|
||||||
if key == 'CPPDEFINES':
|
if key == 'CPPDEFINES':
|
||||||
orig = orig.items()
|
tmp = []
|
||||||
|
for (k, v) in orig.iteritems():
|
||||||
|
if v is not None:
|
||||||
|
tmp.append((k, v))
|
||||||
|
else:
|
||||||
|
tmp.append((k,))
|
||||||
|
orig = tmp
|
||||||
orig += val
|
orig += val
|
||||||
self._dict[key] = orig
|
self._dict[key] = orig
|
||||||
else:
|
else:
|
||||||
|
@ -1286,8 +1292,15 @@ class Base(SubstitutionEnvironment):
|
||||||
else:
|
else:
|
||||||
tmp.append((i,))
|
tmp.append((i,))
|
||||||
val = tmp
|
val = tmp
|
||||||
|
# Construct a list of (key, value) tuples.
|
||||||
if SCons.Util.is_Dict(dk):
|
if SCons.Util.is_Dict(dk):
|
||||||
dk = dk.items()
|
tmp = []
|
||||||
|
for (k, v) in dk.iteritems():
|
||||||
|
if v is not None:
|
||||||
|
tmp.append((k, v))
|
||||||
|
else:
|
||||||
|
tmp.append((k,))
|
||||||
|
dk = tmp
|
||||||
elif SCons.Util.is_String(dk):
|
elif SCons.Util.is_String(dk):
|
||||||
dk = [(dk,)]
|
dk = [(dk,)]
|
||||||
else:
|
else:
|
||||||
|
@ -1327,8 +1340,15 @@ class Base(SubstitutionEnvironment):
|
||||||
else:
|
else:
|
||||||
tmp.append((i,))
|
tmp.append((i,))
|
||||||
dk = tmp
|
dk = tmp
|
||||||
|
# Construct a list of (key, value) tuples.
|
||||||
if SCons.Util.is_Dict(val):
|
if SCons.Util.is_Dict(val):
|
||||||
val = val.items()
|
tmp = []
|
||||||
|
for (k, v) in val.iteritems():
|
||||||
|
if v is not None:
|
||||||
|
tmp.append((k, v))
|
||||||
|
else:
|
||||||
|
tmp.append((k,))
|
||||||
|
val = tmp
|
||||||
elif SCons.Util.is_String(val):
|
elif SCons.Util.is_String(val):
|
||||||
val = [(val,)]
|
val = [(val,)]
|
||||||
if delete_existing:
|
if delete_existing:
|
||||||
|
@ -1351,7 +1371,13 @@ class Base(SubstitutionEnvironment):
|
||||||
if SCons.Util.is_String(dk):
|
if SCons.Util.is_String(dk):
|
||||||
dk = [dk]
|
dk = [dk]
|
||||||
elif SCons.Util.is_Dict(dk):
|
elif SCons.Util.is_Dict(dk):
|
||||||
dk = dk.items()
|
tmp = []
|
||||||
|
for (k, v) in dk.iteritems():
|
||||||
|
if v is not None:
|
||||||
|
tmp.append((k, v))
|
||||||
|
else:
|
||||||
|
tmp.append((k,))
|
||||||
|
dk = tmp
|
||||||
if SCons.Util.is_String(val):
|
if SCons.Util.is_String(val):
|
||||||
if val in dk:
|
if val in dk:
|
||||||
val = []
|
val = []
|
||||||
|
@ -1378,10 +1404,8 @@ class Base(SubstitutionEnvironment):
|
||||||
(like a function). There are no references to any mutable
|
(like a function). There are no references to any mutable
|
||||||
objects in the original Environment.
|
objects in the original Environment.
|
||||||
"""
|
"""
|
||||||
try:
|
|
||||||
builders = self._dict['BUILDERS']
|
builders = self._dict.get('BUILDERS', {})
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
clone = copy.copy(self)
|
clone = copy.copy(self)
|
||||||
# BUILDERS is not safe to do a simple copy
|
# BUILDERS is not safe to do a simple copy
|
||||||
|
@ -1803,8 +1827,8 @@ class Base(SubstitutionEnvironment):
|
||||||
pass
|
pass
|
||||||
elif SCons.Util.is_String(pathext):
|
elif SCons.Util.is_String(pathext):
|
||||||
pathext = self.subst(pathext)
|
pathext = self.subst(pathext)
|
||||||
prog = self.subst(prog)
|
prog = SCons.Util.CLVar(self.subst(prog)) # support "program --with-args"
|
||||||
path = SCons.Util.WhereIs(prog, path, pathext, reject)
|
path = SCons.Util.WhereIs(prog[0], path, pathext, reject)
|
||||||
if path: return path
|
if path: return path
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -2149,7 +2173,7 @@ class Base(SubstitutionEnvironment):
|
||||||
def SourceCode(self, entry, builder):
|
def SourceCode(self, entry, builder):
|
||||||
"""Arrange for a source code builder for (part of) a tree."""
|
"""Arrange for a source code builder for (part of) a tree."""
|
||||||
msg = """SourceCode() has been deprecated and there is no replacement.
|
msg = """SourceCode() has been deprecated and there is no replacement.
|
||||||
\tIf you need this function, please contact dev@scons.tigris.org."""
|
\tIf you need this function, please contact scons-dev@scons.org"""
|
||||||
SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceCodeWarning, msg)
|
SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceCodeWarning, msg)
|
||||||
entries = self.arg2nodes(entry, self.fs.Entry)
|
entries = self.arg2nodes(entry, self.fs.Entry)
|
||||||
for entry in entries:
|
for entry in entries:
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -28,7 +28,7 @@ and user errors in SCons.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Errors.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Errors.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Util
|
import SCons.Util
|
||||||
|
|
|
@ -6,7 +6,7 @@ Nodes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -27,7 +27,7 @@ Nodes.
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Executor.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Executor.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
|
|
@ -7,7 +7,7 @@ stop, and wait on jobs.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -29,7 +29,7 @@ stop, and wait on jobs.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Job.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Job.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.compat
|
import SCons.compat
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Memoize.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Memoize.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Memoizer
|
__doc__ = """Memoizer
|
||||||
|
|
|
@ -8,7 +8,7 @@ This creates a hash of global Aliases (dummy targets).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets).
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Node/Alias.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Node/Alias.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
|
|
@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default.
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Node/FS.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Node/FS.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
|
@ -5,7 +5,7 @@ Python nodes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -27,7 +27,7 @@ Python nodes.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Node/Python.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Node/Python.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Node
|
import SCons.Node
|
||||||
|
|
|
@ -20,7 +20,7 @@ be able to depend on any other type of "thing."
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -41,7 +41,7 @@ be able to depend on any other type of "thing."
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Node/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Node/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Options/BoolOption.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Options/BoolOption.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Options/EnumOption.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Options/EnumOption.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Options/ListOption.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Options/ListOption.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Options/PackageOption.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Options/PackageOption.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Options/PathOption.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Options/PathOption.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Options/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Options/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
__doc__ = """Place-holder for the old SCons.Options module hierarchy
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/PathList.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/PathList.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """SCons.PathList
|
__doc__ = """SCons.PathList
|
||||||
|
|
|
@ -20,7 +20,7 @@ their own platform definition.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -42,7 +42,7 @@ their own platform definition.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.compat
|
import SCons.compat
|
||||||
|
|
||||||
|
@ -173,6 +173,7 @@ class TempFileMunge(object):
|
||||||
length = 0
|
length = 0
|
||||||
for c in cmd:
|
for c in cmd:
|
||||||
length += len(c)
|
length += len(c)
|
||||||
|
length += len(cmd) - 1
|
||||||
if length <= maxline:
|
if length <= maxline:
|
||||||
return self.cmd
|
return self.cmd
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ class TempFileMunge(object):
|
||||||
(fd, tmp) = tempfile.mkstemp('.lnk', text=True)
|
(fd, tmp) = tempfile.mkstemp('.lnk', text=True)
|
||||||
native_tmp = SCons.Util.get_native_path(os.path.normpath(tmp))
|
native_tmp = SCons.Util.get_native_path(os.path.normpath(tmp))
|
||||||
|
|
||||||
if env['SHELL'] and env['SHELL'] == 'sh':
|
if env.get('SHELL',None) == 'sh':
|
||||||
# The sh shell will try to escape the backslashes in the
|
# The sh shell will try to escape the backslashes in the
|
||||||
# path, so unescape them.
|
# path, so unescape them.
|
||||||
native_tmp = native_tmp.replace('\\', r'\\\\')
|
native_tmp = native_tmp.replace('\\', r'\\\\')
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -30,13 +30,17 @@ selection method.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/aix.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/aix.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
import posix
|
import posix
|
||||||
|
|
||||||
def get_xlc(env, xlc=None, xlc_r=None, packages=[]):
|
import SCons.Util
|
||||||
|
import SCons.Action
|
||||||
|
|
||||||
|
def get_xlc(env, xlc=None, packages=[]):
|
||||||
# Use the AIX package installer tool lslpp to figure out where a
|
# Use the AIX package installer tool lslpp to figure out where a
|
||||||
# given xl* compiler is installed and what version it is.
|
# given xl* compiler is installed and what version it is.
|
||||||
xlcPath = None
|
xlcPath = None
|
||||||
|
@ -44,18 +48,30 @@ def get_xlc(env, xlc=None, xlc_r=None, packages=[]):
|
||||||
|
|
||||||
if xlc is None:
|
if xlc is None:
|
||||||
xlc = env.get('CC', 'xlc')
|
xlc = env.get('CC', 'xlc')
|
||||||
if xlc_r is None:
|
if SCons.Util.is_List(xlc):
|
||||||
xlc_r = xlc + '_r'
|
xlc = xlc[0]
|
||||||
for package in packages:
|
for package in packages:
|
||||||
cmd = "lslpp -fc " + package + " 2>/dev/null | egrep '" + xlc + "([^-_a-zA-Z0-9].*)?$'"
|
# find the installed filename, which may be a symlink as well
|
||||||
line = os.popen(cmd).readline()
|
pipe = SCons.Action._subproc(env, ['lslpp', '-fc', package],
|
||||||
if line:
|
stdin = 'devnull',
|
||||||
v, p = line.split(':')[1:3]
|
stderr = 'devnull',
|
||||||
xlcVersion = v.split()[1]
|
stdout = subprocess.PIPE)
|
||||||
xlcPath = p.split()[0]
|
# output of lslpp is something like this:
|
||||||
xlcPath = xlcPath[:xlcPath.rindex('/')]
|
# #Path:Fileset:File
|
||||||
break
|
# /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/exe/xlCcpp
|
||||||
return (xlcPath, xlc, xlc_r, xlcVersion)
|
# /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/bin/xlc_r -> /usr/vac/bin/xlc
|
||||||
|
for line in pipe.stdout:
|
||||||
|
if xlcPath:
|
||||||
|
continue # read everything to let lslpp terminate
|
||||||
|
fileset, filename = line.split(':')[1:3]
|
||||||
|
filename = filename.split()[0]
|
||||||
|
if ('/' in xlc and filename == xlc) \
|
||||||
|
or ('/' not in xlc and filename.endswith('/' + xlc)):
|
||||||
|
xlcVersion = fileset.split()[1]
|
||||||
|
xlcPath, sep, xlc = filename.rpartition('/')
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
return (xlcPath, xlc, xlcVersion)
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
posix.generate(env)
|
posix.generate(env)
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/cygwin.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/cygwin.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import posix
|
import posix
|
||||||
from SCons.Platform import TempFileMunge
|
from SCons.Platform import TempFileMunge
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/darwin.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/darwin.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import posix
|
import posix
|
||||||
import os
|
import os
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/hpux.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/hpux.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import posix
|
import posix
|
||||||
|
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/irix.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/irix.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import posix
|
import posix
|
||||||
|
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/os2.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/os2.py 2014/09/27 12:51:43 garyo"
|
||||||
import win32
|
import win32
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/posix.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/posix.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
import os
|
import os
|
||||||
|
@ -113,6 +113,10 @@ def generate(env):
|
||||||
# This platform supports RPATH specifications.
|
# This platform supports RPATH specifications.
|
||||||
env['__RPATH'] = '$_RPATH'
|
env['__RPATH'] = '$_RPATH'
|
||||||
|
|
||||||
|
# GDC is GCC family, but DMD and LDC have different options.
|
||||||
|
# Must be able to have GCC and DMD work in the same build, so:
|
||||||
|
env['__DRPATH'] = '$_DRPATH'
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width:4
|
# tab-width:4
|
||||||
# indent-tabs-mode:nil
|
# indent-tabs-mode:nil
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/sunos.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/sunos.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import posix
|
import posix
|
||||||
|
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Platform/win32.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Platform/win32.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
|
@ -1,10 +1,18 @@
|
||||||
"""SCons.SConf
|
"""SCons.SConf
|
||||||
|
|
||||||
Autoconf-like configuration support.
|
Autoconf-like configuration support.
|
||||||
|
|
||||||
|
In other words, SConf allows to run tests on the build machine to detect
|
||||||
|
capabilities of system and do some things based on result: generate config
|
||||||
|
files, header files for C/C++, update variables in environment.
|
||||||
|
|
||||||
|
Tests on the build system can detect if compiler sees header files, if
|
||||||
|
libraries are installed, if some command line options are supported etc.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -26,7 +34,7 @@ Autoconf-like configuration support.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/SConf.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/SConf.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.compat
|
import SCons.compat
|
||||||
|
|
||||||
|
@ -110,16 +118,22 @@ def _createConfigH(target, source, env):
|
||||||
def _stringConfigH(target, source, env):
|
def _stringConfigH(target, source, env):
|
||||||
return "scons: Configure: creating " + str(target[0])
|
return "scons: Configure: creating " + str(target[0])
|
||||||
|
|
||||||
def CreateConfigHBuilder(env):
|
|
||||||
"""Called just before the building targets phase begins."""
|
def NeedConfigHBuilder():
|
||||||
if len(_ac_config_hs) == 0:
|
if len(_ac_config_hs) == 0:
|
||||||
return
|
return False
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
|
def CreateConfigHBuilder(env):
|
||||||
|
"""Called if necessary just before the building targets phase begins."""
|
||||||
action = SCons.Action.Action(_createConfigH,
|
action = SCons.Action.Action(_createConfigH,
|
||||||
_stringConfigH)
|
_stringConfigH)
|
||||||
sconfigHBld = SCons.Builder.Builder(action=action)
|
sconfigHBld = SCons.Builder.Builder(action=action)
|
||||||
env.Append( BUILDERS={'SConfigHBuilder':sconfigHBld} )
|
env.Append( BUILDERS={'SConfigHBuilder':sconfigHBld} )
|
||||||
for k in _ac_config_hs.keys():
|
for k in _ac_config_hs.keys():
|
||||||
env.SConfigHBuilder(k, env.Value(_ac_config_hs[k]))
|
env.SConfigHBuilder(k, env.Value(_ac_config_hs[k]))
|
||||||
|
|
||||||
|
|
||||||
class SConfWarning(SCons.Warnings.Warning):
|
class SConfWarning(SCons.Warnings.Warning):
|
||||||
pass
|
pass
|
||||||
|
@ -180,7 +194,13 @@ class Streamer(object):
|
||||||
def write(self, str):
|
def write(self, str):
|
||||||
if self.orig:
|
if self.orig:
|
||||||
self.orig.write(str)
|
self.orig.write(str)
|
||||||
self.s.write(str)
|
try:
|
||||||
|
self.s.write(str)
|
||||||
|
except TypeError as e:
|
||||||
|
if e.message.startswith('unicode argument expected'):
|
||||||
|
self.s.write(str.decode())
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
def writelines(self, lines):
|
def writelines(self, lines):
|
||||||
for l in lines:
|
for l in lines:
|
|
@ -5,7 +5,7 @@ Writing and reading information to the .sconsign file or files.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -27,7 +27,7 @@ Writing and reading information to the .sconsign file or files.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/SConsign.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/SConsign.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.compat
|
import SCons.compat
|
||||||
|
|
|
@ -5,7 +5,7 @@ This module implements the depenency scanner for C/C++ code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -27,7 +27,7 @@ This module implements the depenency scanner for C/C++ code.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/C.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/C.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Node.FS
|
import SCons.Node.FS
|
||||||
import SCons.Scanner
|
import SCons.Scanner
|
|
@ -8,7 +8,7 @@ Coded by Andy Friesen
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -30,7 +30,7 @@ Coded by Andy Friesen
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/D.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/D.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/Dir.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/Dir.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Node.FS
|
import SCons.Node.FS
|
||||||
import SCons.Scanner
|
import SCons.Scanner
|
|
@ -5,7 +5,7 @@ This module implements the dependency scanner for Fortran code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -26,7 +26,7 @@ This module implements the dependency scanner for Fortran code.
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/Fortran.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/Fortran.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -6,7 +6,7 @@ Definition Language) files.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -28,7 +28,7 @@ Definition Language) files.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/IDL.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/IDL.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Node.FS
|
import SCons.Node.FS
|
||||||
import SCons.Scanner
|
import SCons.Scanner
|
|
@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/LaTeX.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/LaTeX.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/Prog.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/Prog.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Node
|
import SCons.Node
|
||||||
import SCons.Node.FS
|
import SCons.Node.FS
|
|
@ -6,7 +6,7 @@ Definition Language) files.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -28,7 +28,7 @@ Definition Language) files.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/RC.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/RC.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Node.FS
|
import SCons.Node.FS
|
||||||
import SCons.Scanner
|
import SCons.Scanner
|
|
@ -5,7 +5,7 @@ The Scanner package for the SCons software construction utility.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Scanner/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Scanner/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Script/Interactive.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Script/Interactive.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """
|
__doc__ = """
|
||||||
SCons interactive mode
|
SCons interactive mode
|
|
@ -13,7 +13,7 @@ it goes here.
|
||||||
unsupported_python_version = (2, 3, 0)
|
unsupported_python_version = (2, 3, 0)
|
||||||
deprecated_python_version = (2, 7, 0)
|
deprecated_python_version = (2, 7, 0)
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -34,7 +34,7 @@ deprecated_python_version = (2, 7, 0)
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Script/Main.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Script/Main.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.compat
|
import SCons.compat
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
|
||||||
|
|
||||||
class CleanTask(SCons.Taskmaster.AlwaysTask):
|
class CleanTask(SCons.Taskmaster.AlwaysTask):
|
||||||
"""An SCons clean task."""
|
"""An SCons clean task."""
|
||||||
def fs_delete(self, path, pathstr, remove=1):
|
def fs_delete(self, path, pathstr, remove=True):
|
||||||
try:
|
try:
|
||||||
if os.path.lexists(path):
|
if os.path.lexists(path):
|
||||||
if os.path.isfile(path) or os.path.islink(path):
|
if os.path.isfile(path) or os.path.islink(path):
|
||||||
|
@ -339,37 +339,41 @@ class CleanTask(SCons.Taskmaster.AlwaysTask):
|
||||||
except (IOError, OSError), e:
|
except (IOError, OSError), e:
|
||||||
print "scons: Could not remove '%s':" % pathstr, e.strerror
|
print "scons: Could not remove '%s':" % pathstr, e.strerror
|
||||||
|
|
||||||
def show(self):
|
def _get_files_to_clean(self):
|
||||||
|
result = []
|
||||||
|
target = self.targets[0]
|
||||||
|
if target.has_builder() or target.side_effect:
|
||||||
|
result = [t for t in self.targets if not t.noclean]
|
||||||
|
return result
|
||||||
|
|
||||||
|
def _clean_targets(self, remove=True):
|
||||||
target = self.targets[0]
|
target = self.targets[0]
|
||||||
if (target.has_builder() or target.side_effect) and not target.noclean:
|
|
||||||
for t in self.targets:
|
|
||||||
if not t.isdir():
|
|
||||||
display("Removed " + str(t))
|
|
||||||
if target in SCons.Environment.CleanTargets:
|
if target in SCons.Environment.CleanTargets:
|
||||||
files = SCons.Environment.CleanTargets[target]
|
files = SCons.Environment.CleanTargets[target]
|
||||||
for f in files:
|
for f in files:
|
||||||
self.fs_delete(f.abspath, str(f), 0)
|
self.fs_delete(f.abspath, str(f), remove)
|
||||||
|
|
||||||
|
def show(self):
|
||||||
|
for t in self._get_files_to_clean():
|
||||||
|
if not t.isdir():
|
||||||
|
display("Removed " + str(t))
|
||||||
|
self._clean_targets(remove=False)
|
||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
target = self.targets[0]
|
for t in self._get_files_to_clean():
|
||||||
if (target.has_builder() or target.side_effect) and not target.noclean:
|
try:
|
||||||
for t in self.targets:
|
removed = t.remove()
|
||||||
try:
|
except OSError, e:
|
||||||
removed = t.remove()
|
# An OSError may indicate something like a permissions
|
||||||
except OSError, e:
|
# issue, an IOError would indicate something like
|
||||||
# An OSError may indicate something like a permissions
|
# the file not existing. In either case, print a
|
||||||
# issue, an IOError would indicate something like
|
# message and keep going to try to remove as many
|
||||||
# the file not existing. In either case, print a
|
# targets aa possible.
|
||||||
# message and keep going to try to remove as many
|
print "scons: Could not remove '%s':" % str(t), e.strerror
|
||||||
# targets aa possible.
|
else:
|
||||||
print "scons: Could not remove '%s':" % str(t), e.strerror
|
if removed:
|
||||||
else:
|
display("Removed " + str(t))
|
||||||
if removed:
|
self._clean_targets(remove=True)
|
||||||
display("Removed " + str(t))
|
|
||||||
if target in SCons.Environment.CleanTargets:
|
|
||||||
files = SCons.Environment.CleanTargets[target]
|
|
||||||
for f in files:
|
|
||||||
self.fs_delete(f.abspath, str(f))
|
|
||||||
|
|
||||||
execute = remove
|
execute = remove
|
||||||
|
|
||||||
|
@ -949,6 +953,14 @@ def _main(parser):
|
||||||
if options.include_dir:
|
if options.include_dir:
|
||||||
sys.path = options.include_dir + sys.path
|
sys.path = options.include_dir + sys.path
|
||||||
|
|
||||||
|
# If we're about to start SCons in the interactive mode,
|
||||||
|
# inform the FS about this right here. Else, the release_target_info
|
||||||
|
# method could get called on some nodes, like the used "gcc" compiler,
|
||||||
|
# when using the Configure methods within the SConscripts.
|
||||||
|
# This would then cause subtle bugs, as already happened in #2971.
|
||||||
|
if options.interactive:
|
||||||
|
SCons.Node.interactive = True
|
||||||
|
|
||||||
# That should cover (most of) the options. Next, set up the variables
|
# That should cover (most of) the options. Next, set up the variables
|
||||||
# that hold command-line arguments, so the SConscript files that we
|
# that hold command-line arguments, so the SConscript files that we
|
||||||
# read and execute have access to them.
|
# read and execute have access to them.
|
||||||
|
@ -1021,13 +1033,17 @@ def _main(parser):
|
||||||
# in case they disabled the warning in the SConscript files.
|
# in case they disabled the warning in the SConscript files.
|
||||||
if python_version_deprecated():
|
if python_version_deprecated():
|
||||||
msg = "Support for pre-%s Python version (%s) is deprecated.\n" + \
|
msg = "Support for pre-%s Python version (%s) is deprecated.\n" + \
|
||||||
" If this will cause hardship, contact dev@scons.tigris.org."
|
" If this will cause hardship, contact scons-dev@scons.org"
|
||||||
deprecated_version_string = ".".join(map(str, deprecated_python_version))
|
deprecated_version_string = ".".join(map(str, deprecated_python_version))
|
||||||
SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning,
|
SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning,
|
||||||
msg % (deprecated_version_string, python_version_string()))
|
msg % (deprecated_version_string, python_version_string()))
|
||||||
|
|
||||||
if not options.help:
|
if not options.help:
|
||||||
SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
|
# [ ] Clarify why we need to create Builder here at all, and
|
||||||
|
# why it is created in DefaultEnvironment
|
||||||
|
# https://bitbucket.org/scons/scons/commits/d27a548aeee8ad5e67ea75c2d19a7d305f784e30
|
||||||
|
if SCons.SConf.NeedConfigHBuilder():
|
||||||
|
SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
|
||||||
|
|
||||||
# Now re-parse the command-line options (any to the left of a '--'
|
# Now re-parse the command-line options (any to the left of a '--'
|
||||||
# argument, that is) with any user-defined command-line options that
|
# argument, that is) with any user-defined command-line options that
|
||||||
|
@ -1074,7 +1090,6 @@ def _main(parser):
|
||||||
platform = SCons.Platform.platform_module()
|
platform = SCons.Platform.platform_module()
|
||||||
|
|
||||||
if options.interactive:
|
if options.interactive:
|
||||||
SCons.Node.interactive = True
|
|
||||||
SCons.Script.Interactive.interact(fs, OptionsParser, options,
|
SCons.Script.Interactive.interact(fs, OptionsParser, options,
|
||||||
targets, target_top)
|
targets, target_top)
|
||||||
|
|
||||||
|
@ -1343,7 +1358,7 @@ def main():
|
||||||
pass
|
pass
|
||||||
parts.append(version_string("engine", SCons))
|
parts.append(version_string("engine", SCons))
|
||||||
parts.append(path_string("engine", SCons))
|
parts.append(path_string("engine", SCons))
|
||||||
parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation")
|
parts.append("Copyright (c) 2001 - 2014 The SCons Foundation")
|
||||||
version = ''.join(parts)
|
version = ''.join(parts)
|
||||||
|
|
||||||
import SConsOptions
|
import SConsOptions
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Script/SConsOptions.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Script/SConsOptions.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
import re
|
import re
|
|
@ -6,7 +6,7 @@ files.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -28,7 +28,7 @@ files.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Script/SConscript.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Script/SConscript.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons
|
import SCons
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
|
@ -461,6 +461,11 @@ class SConsEnvironment(SCons.Environment.Base):
|
||||||
|
|
||||||
def EnsureSConsVersion(self, major, minor, revision=0):
|
def EnsureSConsVersion(self, major, minor, revision=0):
|
||||||
"""Exit abnormally if the SCons version is not late enough."""
|
"""Exit abnormally if the SCons version is not late enough."""
|
||||||
|
# split string to avoid replacement during build process
|
||||||
|
if SCons.__version__ == '__' + 'VERSION__':
|
||||||
|
SCons.Warnings.warn(SCons.Warnings.DevelopmentVersionWarning,
|
||||||
|
"EnsureSConsVersion is ignored for development version")
|
||||||
|
return
|
||||||
scons_ver = self._get_major_minor_revision(SCons.__version__)
|
scons_ver = self._get_major_minor_revision(SCons.__version__)
|
||||||
if scons_ver < (major, minor, revision):
|
if scons_ver < (major, minor, revision):
|
||||||
if revision:
|
if revision:
|
|
@ -12,7 +12,7 @@ it goes here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -34,7 +34,7 @@ it goes here.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Script/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Script/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import time
|
import time
|
||||||
start_time = time.time()
|
start_time = time.time()
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Sig.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Sig.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Place-holder for the old SCons.Sig module hierarchy
|
__doc__ = """Place-holder for the old SCons.Sig module hierarchy
|
||||||
|
|
|
@ -5,7 +5,7 @@ SCons string substitution.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -26,7 +26,7 @@ SCons string substitution.
|
||||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Subst.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Subst.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import re
|
import re
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -47,7 +47,7 @@ interface and the SCons build engine. There are two key classes here:
|
||||||
target(s) that it decides need to be evaluated and/or built.
|
target(s) that it decides need to be evaluated and/or built.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Taskmaster.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Taskmaster.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
import operator
|
import operator
|
|
@ -10,7 +10,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/386asm.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/386asm.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
from SCons.Tool.PharLapCommon import addPharLapPaths
|
from SCons.Tool.PharLapCommon import addPharLapPaths
|
||||||
import SCons.Util
|
import SCons.Util
|
|
@ -10,7 +10,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/BitKeeper.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/BitKeeper.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Builder
|
import SCons.Builder
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/CVS.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/CVS.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Builder
|
import SCons.Builder
|
56
scons/scons-local-2.3.4/SCons/Tool/DCommon.py
Normal file
56
scons/scons-local-2.3.4/SCons/Tool/DCommon.py
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
"""SCons.Tool.DCommon
|
||||||
|
|
||||||
|
Common code for the various D tools.
|
||||||
|
|
||||||
|
Coded by Russel Winder (russel@winder.org.uk)
|
||||||
|
2012-09-06
|
||||||
|
"""
|
||||||
|
#
|
||||||
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
# a copy of this software and associated documentation files (the
|
||||||
|
# "Software"), to deal in the Software without restriction, including
|
||||||
|
# without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
# permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
# the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||||
|
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
|
||||||
|
__revision__ = "src/engine/SCons/Tool/DCommon.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
def isD(env, source):
|
||||||
|
if not source:
|
||||||
|
return 0
|
||||||
|
for s in source:
|
||||||
|
if s.sources:
|
||||||
|
ext = os.path.splitext(str(s.sources[0]))[1]
|
||||||
|
if ext == '.d':
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def addDPATHToEnv(env, executable):
|
||||||
|
dPath = env.WhereIs(executable)
|
||||||
|
if dPath:
|
||||||
|
phobosDir = dPath[:dPath.rindex(executable)] + '/../src/phobos'
|
||||||
|
if os.path.isdir(phobosDir):
|
||||||
|
env.Append(DPATH=[phobosDir])
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# tab-width:4
|
||||||
|
# indent-tabs-mode:nil
|
||||||
|
# End:
|
||||||
|
# vim: set expandtab tabstop=4 shiftwidth=4:
|
|
@ -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, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/FortranCommon.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/FortranCommon.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os.path
|
import os.path
|
|
@ -3,7 +3,7 @@
|
||||||
Used by several tools of `gettext` toolset.
|
Used by several tools of `gettext` toolset.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/GettextCommon.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/GettextCommon.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Warnings
|
import SCons.Warnings
|
||||||
import re
|
import re
|
|
@ -5,7 +5,7 @@ Stuff for processing Java.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/JavaCommon.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/JavaCommon.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -65,7 +65,7 @@ if java_parsing:
|
||||||
def __init__(self, version=default_java_version):
|
def __init__(self, version=default_java_version):
|
||||||
|
|
||||||
if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6', '1.7',
|
if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6', '1.7',
|
||||||
'5', '6'):
|
'1.8', '5', '6'):
|
||||||
msg = "Java version %s not supported" % version
|
msg = "Java version %s not supported" % version
|
||||||
raise NotImplementedError(msg)
|
raise NotImplementedError(msg)
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ if java_parsing:
|
||||||
if self.version in ('1.1', '1.2', '1.3', '1.4'):
|
if self.version in ('1.1', '1.2', '1.3', '1.4'):
|
||||||
clazz = self.listClasses[0]
|
clazz = self.listClasses[0]
|
||||||
self.listOutputs.append('%s$%d' % (clazz, self.nextAnon))
|
self.listOutputs.append('%s$%d' % (clazz, self.nextAnon))
|
||||||
elif self.version in ('1.5', '1.6', '1.7', '5', '6'):
|
elif self.version in ('1.5', '1.6', '1.7', '1.8', '5', '6'):
|
||||||
self.stackAnonClassBrackets.append(self.brackets)
|
self.stackAnonClassBrackets.append(self.brackets)
|
||||||
className = []
|
className = []
|
||||||
className.extend(self.listClasses)
|
className.extend(self.listClasses)
|
||||||
|
@ -244,7 +244,8 @@ if java_parsing:
|
||||||
return self
|
return self
|
||||||
# If that's an inner class which is declared in a method, it
|
# If that's an inner class which is declared in a method, it
|
||||||
# requires an index prepended to the class-name, e.g.
|
# requires an index prepended to the class-name, e.g.
|
||||||
# 'Foo$1Inner' (Tigris Issue 2087)
|
# 'Foo$1Inner'
|
||||||
|
# http://scons.tigris.org/issues/show_bug.cgi?id=2087
|
||||||
if self.outer_state.localClasses and \
|
if self.outer_state.localClasses and \
|
||||||
self.outer_state.stackBrackets[-1] > \
|
self.outer_state.stackBrackets[-1] > \
|
||||||
self.outer_state.stackBrackets[-2]+1:
|
self.outer_state.stackBrackets[-2]+1:
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """
|
__doc__ = """
|
||||||
Common functions for Microsoft Visual Studio and Visual C/C++.
|
Common functions for Microsoft Visual Studio and Visual C/C++.
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Module to define supported Windows chip architectures.
|
__doc__ = """Module to define supported Windows chip architectures.
|
||||||
"""
|
"""
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """
|
__doc__ = """
|
||||||
Common helper functions for working with the Microsoft tool chain.
|
Common helper functions for working with the Microsoft tool chain.
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """
|
__doc__ = """
|
||||||
"""
|
"""
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Module to detect the Platform/Windows SDK
|
__doc__ = """Module to detect the Platform/Windows SDK
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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)
|
# * test on 64 bits XP + VS 2005 (and VS 6 if possible)
|
||||||
# * SDK
|
# * SDK
|
||||||
# * Assembly
|
# * Assembly
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Module for Visual C/C++ detection and configuration.
|
__doc__ = """Module for Visual C/C++ detection and configuration.
|
||||||
"""
|
"""
|
||||||
|
@ -89,6 +89,7 @@ _ARCH_TO_CANONICAL = {
|
||||||
_HOST_TARGET_ARCH_TO_BAT_ARCH = {
|
_HOST_TARGET_ARCH_TO_BAT_ARCH = {
|
||||||
("x86", "x86"): "x86",
|
("x86", "x86"): "x86",
|
||||||
("x86", "amd64"): "x86_amd64",
|
("x86", "amd64"): "x86_amd64",
|
||||||
|
("x86", "x86_amd64"): "x86_amd64",
|
||||||
("amd64", "x86_amd64"): "x86_amd64", # This is present in (at least) VS2012 express
|
("amd64", "x86_amd64"): "x86_amd64", # This is present in (at least) VS2012 express
|
||||||
("amd64", "amd64"): "amd64",
|
("amd64", "amd64"): "amd64",
|
||||||
("amd64", "x86"): "x86",
|
("amd64", "x86"): "x86",
|
||||||
|
@ -131,9 +132,15 @@ def get_host_target(env):
|
||||||
|
|
||||||
return (host, target,req_target_platform)
|
return (host, target,req_target_platform)
|
||||||
|
|
||||||
_VCVER = ["11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
|
# If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the
|
||||||
|
# MSVC_VERSION documentation in Tool/msvc.xml.
|
||||||
|
_VCVER = ["12.0", "12.0Exp", "11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
|
||||||
|
|
||||||
_VCVER_TO_PRODUCT_DIR = {
|
_VCVER_TO_PRODUCT_DIR = {
|
||||||
|
'12.0' : [
|
||||||
|
r'Microsoft\VisualStudio\12.0\Setup\VC\ProductDir'],
|
||||||
|
'12.0Exp' : [
|
||||||
|
r'Microsoft\VCExpress\12.0\Setup\VC\ProductDir'],
|
||||||
'11.0': [
|
'11.0': [
|
||||||
r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'],
|
r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'],
|
||||||
'11.0Exp' : [
|
'11.0Exp' : [
|
||||||
|
@ -298,8 +305,21 @@ def reset_installed_vcs():
|
||||||
"""Make it try again to find VC. This is just for the tests."""
|
"""Make it try again to find VC. This is just for the tests."""
|
||||||
__INSTALLED_VCS_RUN = None
|
__INSTALLED_VCS_RUN = None
|
||||||
|
|
||||||
|
# Running these batch files isn't cheap: most of the time spent in
|
||||||
|
# msvs.generate() is due to vcvars*.bat. In a build that uses "tools='msvs'"
|
||||||
|
# in multiple environments, for example:
|
||||||
|
# env1 = Environment(tools='msvs')
|
||||||
|
# env2 = Environment(tools='msvs')
|
||||||
|
# we can greatly improve the speed of the second and subsequent Environment
|
||||||
|
# (or Clone) calls by memoizing the environment variables set by vcvars*.bat.
|
||||||
|
script_env_stdout_cache = {}
|
||||||
def script_env(script, args=None):
|
def script_env(script, args=None):
|
||||||
stdout = common.get_output(script, args)
|
cache_key = (script, args)
|
||||||
|
stdout = script_env_stdout_cache.get(cache_key, None)
|
||||||
|
if stdout is None:
|
||||||
|
stdout = common.get_output(script, args)
|
||||||
|
script_env_stdout_cache[cache_key] = stdout
|
||||||
|
|
||||||
# Stupid batch files do not set return code: we take a look at the
|
# Stupid batch files do not set return code: we take a look at the
|
||||||
# beginning of the output for an error message instead
|
# beginning of the output for an error message instead
|
||||||
olines = stdout.splitlines()
|
olines = stdout.splitlines()
|
||||||
|
@ -416,7 +436,7 @@ def msvc_find_valid_batch_script(env,version):
|
||||||
if not vc_script and sdk_script:
|
if not vc_script and sdk_script:
|
||||||
debug('vc.py:msvc_find_valid_batch_script() use_script 4: trying sdk script: %s'%(sdk_script))
|
debug('vc.py:msvc_find_valid_batch_script() use_script 4: trying sdk script: %s'%(sdk_script))
|
||||||
try:
|
try:
|
||||||
d = script_env(sdk_script,args=[])
|
d = script_env(sdk_script)
|
||||||
except BatchFileExecutionError,e:
|
except BatchFileExecutionError,e:
|
||||||
debug('vc.py:msvc_find_valid_batch_script() use_script 5: failed running SDK script %s: Error:%s'%(repr(sdk_script),e))
|
debug('vc.py:msvc_find_valid_batch_script() use_script 5: failed running SDK script %s: Error:%s'%(repr(sdk_script),e))
|
||||||
continue
|
continue
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
__doc__ = """Module to detect Visual Studio and/or Visual C/C++
|
__doc__ = """Module to detect Visual Studio and/or Visual C/C++
|
||||||
"""
|
"""
|
||||||
|
@ -73,7 +73,7 @@ class VisualStudio(object):
|
||||||
debug('find_vs_dir(): no installed VC %s' % self.vc_version)
|
debug('find_vs_dir(): no installed VC %s' % self.vc_version)
|
||||||
return None
|
return None
|
||||||
return dir
|
return dir
|
||||||
|
|
||||||
def find_vs_dir_by_reg(self):
|
def find_vs_dir_by_reg(self):
|
||||||
root = 'Software\\'
|
root = 'Software\\'
|
||||||
|
|
||||||
|
@ -91,13 +91,13 @@ class VisualStudio(object):
|
||||||
debug('find_vs_dir_by_reg(): found VS in registry: %s' % comps)
|
debug('find_vs_dir_by_reg(): found VS in registry: %s' % comps)
|
||||||
return comps
|
return comps
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def find_vs_dir(self):
|
def find_vs_dir(self):
|
||||||
""" Can use registry or location of VC to find vs dir
|
""" Can use registry or location of VC to find vs dir
|
||||||
First try to find by registry, and if that fails find via VC dir
|
First try to find by registry, and if that fails find via VC dir
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
if True:
|
if True:
|
||||||
vs_dir=self.find_vs_dir_by_reg()
|
vs_dir=self.find_vs_dir_by_reg()
|
||||||
return vs_dir
|
return vs_dir
|
||||||
|
@ -115,7 +115,7 @@ class VisualStudio(object):
|
||||||
debug('find_executable(): %s not on file system' % executable)
|
debug('find_executable(): %s not on file system' % executable)
|
||||||
return None
|
return None
|
||||||
return executable
|
return executable
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
def get_batch_file(self):
|
def get_batch_file(self):
|
||||||
|
@ -199,102 +199,96 @@ class VisualStudio(object):
|
||||||
# good money for in preference to whatever Microsoft makes available
|
# good money for in preference to whatever Microsoft makes available
|
||||||
# for free.
|
# for free.
|
||||||
#
|
#
|
||||||
# If you update this list, update the documentation in Tool/msvs.xml.
|
# If you update this list, update _VCVER and _VCVER_TO_PRODUCT_DIR in
|
||||||
|
# Tool/MSCommon/vc.py, and the MSVC_VERSION documentation in Tool/msvc.xml.
|
||||||
|
|
||||||
SupportedVSList = [
|
SupportedVSList = [
|
||||||
# Visual Studio 2010
|
# Visual Studio 2013
|
||||||
# TODO: find the settings, perhaps from someone with a CTP copy?
|
VisualStudio('12.0',
|
||||||
#VisualStudio('TBD',
|
vc_version='12.0',
|
||||||
# hkey_root=r'TBD',
|
sdk_version='8.1A',
|
||||||
# common_tools_var='TBD',
|
hkeys=[r'Microsoft\VisualStudio\12.0\Setup\VS\ProductDir'],
|
||||||
# executable_path=r'TBD',
|
common_tools_var='VS120COMNTOOLS',
|
||||||
# default_dirname='TBD',
|
executable_path=r'Common7\IDE\devenv.com',
|
||||||
#),
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
|
supported_arch=['x86', 'amd64'],
|
||||||
|
),
|
||||||
|
|
||||||
# Visual Studio 11
|
# Visual C++ 2013 Express Edition (for Desktop)
|
||||||
# The batch file we look for is in the VC directory,
|
VisualStudio('12.0Exp',
|
||||||
# so the devenv.com executable is up in ..\..\Common7\IDE.
|
vc_version='12.0',
|
||||||
|
sdk_version='8.1A',
|
||||||
|
hkeys=[r'Microsoft\VisualStudio\12.0\Setup\VS\ProductDir'],
|
||||||
|
common_tools_var='VS120COMNTOOLS',
|
||||||
|
executable_path=r'Common7\IDE\WDExpress.exe',
|
||||||
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
|
supported_arch=['x86', 'amd64'],
|
||||||
|
),
|
||||||
|
|
||||||
|
# Visual Studio 2012
|
||||||
VisualStudio('11.0',
|
VisualStudio('11.0',
|
||||||
sdk_version='6.1',
|
sdk_version='8.0A',
|
||||||
hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
|
||||||
common_tools_var='VS110COMNTOOLS',
|
common_tools_var='VS110COMNTOOLS',
|
||||||
executable_path=r'Common7\IDE\devenv.com',
|
executable_path=r'Common7\IDE\devenv.com',
|
||||||
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
default_dirname='Microsoft Visual Studio 11',
|
|
||||||
supported_arch=['x86', 'amd64'],
|
supported_arch=['x86', 'amd64'],
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual C++ 11 Express Edition
|
# Visual C++ 2012 Express Edition (for Desktop)
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the VCExpress.exe executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('11.0Exp',
|
VisualStudio('11.0Exp',
|
||||||
vc_version='11.0',
|
vc_version='11.0',
|
||||||
sdk_version='6.1',
|
sdk_version='8.0A',
|
||||||
hkeys=[r'Microsoft\VCExpress\11.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
|
||||||
common_tools_var='VS110COMNTOOLS',
|
common_tools_var='VS110COMNTOOLS',
|
||||||
executable_path=r'Common7\IDE\VCExpress.exe',
|
executable_path=r'Common7\IDE\WDExpress.exe',
|
||||||
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
default_dirname='Microsoft Visual Studio 11',
|
supported_arch=['x86', 'amd64'],
|
||||||
supported_arch=['x86'],
|
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the devenv.com executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('10.0',
|
VisualStudio('10.0',
|
||||||
sdk_version='6.1',
|
sdk_version='7.0A',
|
||||||
hkeys=[r'Microsoft\VisualStudio\10.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\10.0\Setup\VS\ProductDir'],
|
||||||
common_tools_var='VS100COMNTOOLS',
|
common_tools_var='VS100COMNTOOLS',
|
||||||
executable_path=r'Common7\IDE\devenv.com',
|
executable_path=r'Common7\IDE\devenv.com',
|
||||||
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
default_dirname='Microsoft Visual Studio 10',
|
|
||||||
supported_arch=['x86', 'amd64'],
|
supported_arch=['x86', 'amd64'],
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual C++ 2010 Express Edition
|
# Visual C++ 2010 Express Edition
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the VCExpress.exe executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('10.0Exp',
|
VisualStudio('10.0Exp',
|
||||||
vc_version='10.0',
|
vc_version='10.0',
|
||||||
sdk_version='6.1',
|
sdk_version='7.0A',
|
||||||
hkeys=[r'Microsoft\VCExpress\10.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VCExpress\10.0\Setup\VS\ProductDir'],
|
||||||
common_tools_var='VS100COMNTOOLS',
|
common_tools_var='VS100COMNTOOLS',
|
||||||
executable_path=r'Common7\IDE\VCExpress.exe',
|
executable_path=r'Common7\IDE\VCExpress.exe',
|
||||||
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
default_dirname='Microsoft Visual Studio 10',
|
|
||||||
supported_arch=['x86'],
|
supported_arch=['x86'],
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual Studio 2008
|
# Visual Studio 2008
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the devenv.com executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('9.0',
|
VisualStudio('9.0',
|
||||||
sdk_version='6.1',
|
sdk_version='6.0A',
|
||||||
hkeys=[r'Microsoft\VisualStudio\9.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\9.0\Setup\VS\ProductDir'],
|
||||||
common_tools_var='VS90COMNTOOLS',
|
common_tools_var='VS90COMNTOOLS',
|
||||||
executable_path=r'Common7\IDE\devenv.com',
|
executable_path=r'Common7\IDE\devenv.com',
|
||||||
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
default_dirname='Microsoft Visual Studio 9',
|
|
||||||
supported_arch=['x86', 'amd64'],
|
supported_arch=['x86', 'amd64'],
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual C++ 2008 Express Edition
|
# Visual C++ 2008 Express Edition
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the VCExpress.exe executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('9.0Exp',
|
VisualStudio('9.0Exp',
|
||||||
vc_version='9.0',
|
vc_version='9.0',
|
||||||
sdk_version='6.1',
|
sdk_version='6.0A',
|
||||||
hkeys=[r'Microsoft\VCExpress\9.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VCExpress\9.0\Setup\VS\ProductDir'],
|
||||||
common_tools_var='VS90COMNTOOLS',
|
common_tools_var='VS90COMNTOOLS',
|
||||||
executable_path=r'Common7\IDE\VCExpress.exe',
|
executable_path=r'Common7\IDE\VCExpress.exe',
|
||||||
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
batch_file_path=r'Common7\Tools\vsvars32.bat',
|
||||||
default_dirname='Microsoft Visual Studio 9',
|
|
||||||
supported_arch=['x86'],
|
supported_arch=['x86'],
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual Studio 2005
|
# Visual Studio 2005
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the devenv.com executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('8.0',
|
VisualStudio('8.0',
|
||||||
sdk_version='6.0A',
|
sdk_version='6.0A',
|
||||||
hkeys=[r'Microsoft\VisualStudio\8.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\8.0\Setup\VS\ProductDir'],
|
||||||
|
@ -306,8 +300,6 @@ SupportedVSList = [
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual C++ 2005 Express Edition
|
# Visual C++ 2005 Express Edition
|
||||||
# The batch file we look for is in the VC directory,
|
|
||||||
# so the VCExpress.exe executable is up in ..\..\Common7\IDE.
|
|
||||||
VisualStudio('8.0Exp',
|
VisualStudio('8.0Exp',
|
||||||
vc_version='8.0Exp',
|
vc_version='8.0Exp',
|
||||||
sdk_version='6.0A',
|
sdk_version='6.0A',
|
||||||
|
@ -320,8 +312,6 @@ SupportedVSList = [
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual Studio .NET 2003
|
# Visual Studio .NET 2003
|
||||||
# The batch file we look for is in the Common7\Tools directory,
|
|
||||||
# so the devenv.com executable is next door in ..\IDE.
|
|
||||||
VisualStudio('7.1',
|
VisualStudio('7.1',
|
||||||
sdk_version='6.0',
|
sdk_version='6.0',
|
||||||
hkeys=[r'Microsoft\VisualStudio\7.1\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\7.1\Setup\VS\ProductDir'],
|
||||||
|
@ -333,8 +323,6 @@ SupportedVSList = [
|
||||||
),
|
),
|
||||||
|
|
||||||
# Visual Studio .NET
|
# Visual Studio .NET
|
||||||
# The batch file we look for is in the Common7\Tools directory,
|
|
||||||
# so the devenv.com executable is next door in ..\IDE.
|
|
||||||
VisualStudio('7.0',
|
VisualStudio('7.0',
|
||||||
sdk_version='2003R2',
|
sdk_version='2003R2',
|
||||||
hkeys=[r'Microsoft\VisualStudio\7.0\Setup\VS\ProductDir'],
|
hkeys=[r'Microsoft\VisualStudio\7.0\Setup\VS\ProductDir'],
|
||||||
|
@ -393,11 +381,11 @@ def reset_installed_visual_studios():
|
||||||
InstalledVSMap = None
|
InstalledVSMap = None
|
||||||
for vs in SupportedVSList:
|
for vs in SupportedVSList:
|
||||||
vs.reset()
|
vs.reset()
|
||||||
|
|
||||||
# Need to clear installed VC's as well as they are used in finding
|
# Need to clear installed VC's as well as they are used in finding
|
||||||
# installed VS's
|
# installed VS's
|
||||||
SCons.Tool.MSCommon.vc.reset_installed_vcs()
|
SCons.Tool.MSCommon.vc.reset_installed_vcs()
|
||||||
|
|
||||||
|
|
||||||
# We may be asked to update multiple construction environments with
|
# We may be asked to update multiple construction environments with
|
||||||
# SDK information. When doing this, we check on-disk for whether
|
# SDK information. When doing this, we check on-disk for whether
|
||||||
|
@ -462,7 +450,7 @@ def get_default_version(env):
|
||||||
|
|
||||||
If no version was requested by the user through the MSVS environment
|
If no version was requested by the user through the MSVS environment
|
||||||
variable, query all the available the visual studios through
|
variable, query all the available the visual studios through
|
||||||
query_versions, and take the highest one.
|
get_installed_visual_studios, and take the highest one.
|
||||||
|
|
||||||
Return
|
Return
|
||||||
------
|
------
|
||||||
|
@ -470,6 +458,7 @@ def get_default_version(env):
|
||||||
the default version.
|
the default version.
|
||||||
"""
|
"""
|
||||||
if 'MSVS' not in env or not SCons.Util.is_Dict(env['MSVS']):
|
if 'MSVS' not in env or not SCons.Util.is_Dict(env['MSVS']):
|
||||||
|
# get all versions, and remember them for speed later
|
||||||
versions = [vs.version for vs in get_installed_visual_studios()]
|
versions = [vs.version for vs in get_installed_visual_studios()]
|
||||||
env['MSVS'] = {'VERSIONS' : versions}
|
env['MSVS'] = {'VERSIONS' : versions}
|
||||||
else:
|
else:
|
||||||
|
@ -479,6 +468,8 @@ def get_default_version(env):
|
||||||
if versions:
|
if versions:
|
||||||
env['MSVS_VERSION'] = versions[0] #use highest version by default
|
env['MSVS_VERSION'] = versions[0] #use highest version by default
|
||||||
else:
|
else:
|
||||||
|
debug('get_default_version: WARNING: no installed versions found, '
|
||||||
|
'using first in SupportedVSList (%s)'%SupportedVSList[0].version)
|
||||||
env['MSVS_VERSION'] = SupportedVSList[0].version
|
env['MSVS_VERSION'] = SupportedVSList[0].version
|
||||||
|
|
||||||
env['MSVS']['VERSION'] = env['MSVS_VERSION']
|
env['MSVS']['VERSION'] = env['MSVS_VERSION']
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/Perforce.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/Perforce.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -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, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/RCS.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/RCS.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Builder
|
import SCons.Builder
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/SCCS.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/SCCS.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Builder
|
import SCons.Builder
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/Subversion.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/Subversion.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
|
@ -14,7 +14,7 @@ tool definition.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/__init__.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/__init__.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import imp
|
import imp
|
||||||
import sys
|
import sys
|
||||||
|
@ -705,7 +705,7 @@ def tool_list(platform, env):
|
||||||
assemblers = ['masm', 'nasm', 'gas', '386asm' ]
|
assemblers = ['masm', 'nasm', 'gas', '386asm' ]
|
||||||
fortran_compilers = ['gfortran', 'g77', 'ifl', 'cvf', 'f95', 'f90', 'fortran']
|
fortran_compilers = ['gfortran', 'g77', 'ifl', 'cvf', 'f95', 'f90', 'fortran']
|
||||||
ars = ['mslib', 'ar', 'tlib']
|
ars = ['mslib', 'ar', 'tlib']
|
||||||
other_plat_tools=['msvs','midl']
|
other_plat_tools = ['msvs', 'midl']
|
||||||
elif str(platform) == 'os2':
|
elif str(platform) == 'os2':
|
||||||
"prefer IBM tools on OS/2"
|
"prefer IBM tools on OS/2"
|
||||||
linkers = ['ilink', 'gnulink', ]#'mslink']
|
linkers = ['ilink', 'gnulink', ]#'mslink']
|
||||||
|
@ -772,6 +772,9 @@ def tool_list(platform, env):
|
||||||
fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
|
fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
|
||||||
ars = ['ar', 'mslib']
|
ars = ['ar', 'mslib']
|
||||||
|
|
||||||
|
if not str(platform) == 'win32':
|
||||||
|
other_plat_tools += ['m4', 'rpm']
|
||||||
|
|
||||||
c_compiler = FindTool(c_compilers, env) or c_compilers[0]
|
c_compiler = FindTool(c_compilers, env) or c_compilers[0]
|
||||||
|
|
||||||
# XXX this logic about what tool provides what should somehow be
|
# XXX this logic about what tool provides what should somehow be
|
||||||
|
@ -795,12 +798,13 @@ def tool_list(platform, env):
|
||||||
fortran_compiler = FindTool(fortran_compilers, env) or fortran_compilers[0]
|
fortran_compiler = FindTool(fortran_compilers, env) or fortran_compilers[0]
|
||||||
ar = FindTool(ars, env) or ars[0]
|
ar = FindTool(ars, env) or ars[0]
|
||||||
|
|
||||||
|
d_compilers = ['dmd', 'gdc', 'ldc']
|
||||||
|
d_compiler = FindTool(d_compilers, env) or d_compilers[0]
|
||||||
|
|
||||||
other_tools = FindAllTools(other_plat_tools + [
|
other_tools = FindAllTools(other_plat_tools + [
|
||||||
'dmd',
|
|
||||||
#TODO: merge 'install' into 'filesystem' and
|
#TODO: merge 'install' into 'filesystem' and
|
||||||
# make 'filesystem' the default
|
# make 'filesystem' the default
|
||||||
'filesystem',
|
'filesystem',
|
||||||
'm4',
|
|
||||||
'wix', #'midl', 'msvs',
|
'wix', #'midl', 'msvs',
|
||||||
# Parser generators
|
# Parser generators
|
||||||
'lex', 'yacc',
|
'lex', 'yacc',
|
||||||
|
@ -812,14 +816,14 @@ def tool_list(platform, env):
|
||||||
'dvipdf', 'dvips', 'gs',
|
'dvipdf', 'dvips', 'gs',
|
||||||
'tex', 'latex', 'pdflatex', 'pdftex',
|
'tex', 'latex', 'pdflatex', 'pdftex',
|
||||||
# Archivers
|
# Archivers
|
||||||
'tar', 'zip', 'rpm',
|
'tar', 'zip',
|
||||||
# SourceCode factories
|
# SourceCode factories
|
||||||
'BitKeeper', 'CVS', 'Perforce',
|
'BitKeeper', 'CVS', 'Perforce',
|
||||||
'RCS', 'SCCS', # 'Subversion',
|
'RCS', 'SCCS', # 'Subversion',
|
||||||
], env)
|
], env)
|
||||||
|
|
||||||
tools = ([linker, c_compiler, cxx_compiler,
|
tools = ([linker, c_compiler, cxx_compiler,
|
||||||
fortran_compiler, assembler, ar]
|
fortran_compiler, assembler, ar, d_compiler]
|
||||||
+ other_tools)
|
+ other_tools)
|
||||||
|
|
||||||
return [x for x in tools if x]
|
return [x for x in tools if x]
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/aixc++.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/aixc++.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
@ -43,32 +43,25 @@ packages = ['vacpp.cmp.core', 'vacpp.cmp.batch', 'vacpp.cmp.C', 'ibmcxx.cmp']
|
||||||
|
|
||||||
def get_xlc(env):
|
def get_xlc(env):
|
||||||
xlc = env.get('CXX', 'xlC')
|
xlc = env.get('CXX', 'xlC')
|
||||||
xlc_r = env.get('SHCXX', 'xlC_r')
|
return SCons.Platform.aix.get_xlc(env, xlc, packages)
|
||||||
return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages)
|
|
||||||
|
|
||||||
def smart_cxxflags(source, target, env, for_signature):
|
|
||||||
build_dir = env.GetBuildPath()
|
|
||||||
if build_dir:
|
|
||||||
return '-qtempinc=' + os.path.join(build_dir, 'tempinc')
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
"""Add Builders and construction variables for xlC / Visual Age
|
"""Add Builders and construction variables for xlC / Visual Age
|
||||||
suite to an Environment."""
|
suite to an Environment."""
|
||||||
path, _cxx, _shcxx, version = get_xlc(env)
|
path, _cxx, version = get_xlc(env)
|
||||||
if path:
|
if path and _cxx:
|
||||||
_cxx = os.path.join(path, _cxx)
|
_cxx = os.path.join(path, _cxx)
|
||||||
_shcxx = os.path.join(path, _shcxx)
|
|
||||||
|
if 'CXX' not in env:
|
||||||
|
env['CXX'] = _cxx
|
||||||
|
|
||||||
cplusplus.generate(env)
|
cplusplus.generate(env)
|
||||||
|
|
||||||
env['CXX'] = _cxx
|
if version:
|
||||||
env['SHCXX'] = _shcxx
|
env['CXXVERSION'] = version
|
||||||
env['CXXVERSION'] = version
|
|
||||||
env['SHOBJSUFFIX'] = '.pic.o'
|
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
path, _cxx, _shcxx, version = get_xlc(env)
|
path, _cxx, version = get_xlc(env)
|
||||||
if path and _cxx:
|
if path and _cxx:
|
||||||
xlc = os.path.join(path, _cxx)
|
xlc = os.path.join(path, _cxx)
|
||||||
if os.path.exists(xlc):
|
if os.path.exists(xlc):
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/aixcc.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/aixcc.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
@ -42,25 +42,25 @@ packages = ['vac.C', 'ibmcxx.cmp']
|
||||||
|
|
||||||
def get_xlc(env):
|
def get_xlc(env):
|
||||||
xlc = env.get('CC', 'xlc')
|
xlc = env.get('CC', 'xlc')
|
||||||
xlc_r = env.get('SHCC', 'xlc_r')
|
return SCons.Platform.aix.get_xlc(env, xlc, packages)
|
||||||
return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages)
|
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
"""Add Builders and construction variables for xlc / Visual Age
|
"""Add Builders and construction variables for xlc / Visual Age
|
||||||
suite to an Environment."""
|
suite to an Environment."""
|
||||||
path, _cc, _shcc, version = get_xlc(env)
|
path, _cc, version = get_xlc(env)
|
||||||
if path:
|
if path and _cc:
|
||||||
_cc = os.path.join(path, _cc)
|
_cc = os.path.join(path, _cc)
|
||||||
_shcc = os.path.join(path, _shcc)
|
|
||||||
|
if 'CC' not in env:
|
||||||
|
env['CC'] = _cc
|
||||||
|
|
||||||
cc.generate(env)
|
cc.generate(env)
|
||||||
|
|
||||||
env['CC'] = _cc
|
if version:
|
||||||
env['SHCC'] = _shcc
|
env['CCVERSION'] = version
|
||||||
env['CCVERSION'] = version
|
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
path, _cc, _shcc, version = get_xlc(env)
|
path, _cc, version = get_xlc(env)
|
||||||
if path and _cc:
|
if path and _cc:
|
||||||
xlc = os.path.join(path, _cc)
|
xlc = os.path.join(path, _cc)
|
||||||
if os.path.exists(xlc):
|
if os.path.exists(xlc):
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/aixf77.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/aixf77.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# a copy of this software and associated documentation files (the
|
||||||
|
@ -30,14 +30,13 @@ selection method.
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/aixlink.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/aixlink.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import SCons.Util
|
import SCons.Util
|
||||||
|
|
||||||
import aixcc
|
|
||||||
import link
|
import link
|
||||||
|
|
||||||
cplusplus = __import__('c++', globals(), locals(), [])
|
cplusplus = __import__('c++', globals(), locals(), [])
|
||||||
|
@ -62,12 +61,14 @@ def generate(env):
|
||||||
env['SHLIBSUFFIX'] = '.a'
|
env['SHLIBSUFFIX'] = '.a'
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
path, _cc, _shcc, version = aixcc.get_xlc(env)
|
# TODO: sync with link.smart_link() to choose a linker
|
||||||
if path and _cc:
|
linkers = { 'CXX': ['aixc++'], 'CC': ['aixcc'] }
|
||||||
xlc = os.path.join(path, _cc)
|
alltools = []
|
||||||
if os.path.exists(xlc):
|
for langvar, linktools in linkers.items():
|
||||||
return xlc
|
if langvar in env: # use CC over CXX when user specified CC but not CXX
|
||||||
return None
|
return SCons.Tool.FindTool(linktools, env)
|
||||||
|
alltools.extend(linktools)
|
||||||
|
return SCons.Tool.FindTool(alltools, env)
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width:4
|
# tab-width:4
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/applelink.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/applelink.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Util
|
import SCons.Util
|
||||||
|
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/ar.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/ar.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
import SCons.Tool
|
import SCons.Tool
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/as.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/as.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
import SCons.Tool
|
import SCons.Tool
|
|
@ -5,7 +5,7 @@ XXX
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/bcc32.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/bcc32.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/c++.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/c++.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
@ -72,7 +72,8 @@ def generate(env):
|
||||||
|
|
||||||
SCons.Tool.cc.add_common_cc_variables(env)
|
SCons.Tool.cc.add_common_cc_variables(env)
|
||||||
|
|
||||||
env['CXX'] = 'c++'
|
if 'CXX' not in env:
|
||||||
|
env['CXX'] = env.Detect(compilers) or compilers[0]
|
||||||
env['CXXFLAGS'] = SCons.Util.CLVar('')
|
env['CXXFLAGS'] = SCons.Util.CLVar('')
|
||||||
env['CXXCOM'] = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
|
env['CXXCOM'] = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
|
||||||
env['SHCXX'] = '$CXX'
|
env['SHCXX'] = '$CXX'
|
||||||
|
@ -90,7 +91,7 @@ def generate(env):
|
||||||
env['CXXFILESUFFIX'] = '.cc'
|
env['CXXFILESUFFIX'] = '.cc'
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
return env.Detect(compilers)
|
return env.Detect(env.get('CXX', compilers))
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width:4
|
# tab-width:4
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/cc.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/cc.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Tool
|
import SCons.Tool
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
|
@ -62,6 +62,8 @@ def add_common_cc_variables(env):
|
||||||
if 'SHCCFLAGS' not in env:
|
if 'SHCCFLAGS' not in env:
|
||||||
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
|
env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
|
||||||
|
|
||||||
|
compilers = ['cc']
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
"""
|
"""
|
||||||
Add Builders and construction variables for C compilers to an Environment.
|
Add Builders and construction variables for C compilers to an Environment.
|
||||||
|
@ -76,7 +78,8 @@ def generate(env):
|
||||||
|
|
||||||
add_common_cc_variables(env)
|
add_common_cc_variables(env)
|
||||||
|
|
||||||
env['CC'] = 'cc'
|
if 'CC' not in env:
|
||||||
|
env['CC'] = env.Detect(compilers) or compilers[0]
|
||||||
env['CFLAGS'] = SCons.Util.CLVar('')
|
env['CFLAGS'] = SCons.Util.CLVar('')
|
||||||
env['CCCOM'] = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
|
env['CCCOM'] = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
|
||||||
env['SHCC'] = '$CC'
|
env['SHCC'] = '$CC'
|
||||||
|
@ -93,7 +96,7 @@ def generate(env):
|
||||||
env['CFILESUFFIX'] = '.c'
|
env['CFILESUFFIX'] = '.c'
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
return env.Detect('cc')
|
return env.Detect(env.get('CC', compilers))
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width:4
|
# tab-width:4
|
|
@ -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, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/cvf.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/cvf.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import fortran
|
import fortran
|
||||||
|
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/default.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/default.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Tool
|
import SCons.Tool
|
||||||
|
|
152
scons/scons-local-2.3.4/SCons/Tool/dmd.py
Normal file
152
scons/scons-local-2.3.4/SCons/Tool/dmd.py
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
"""SCons.Tool.dmd
|
||||||
|
|
||||||
|
Tool-specific initialization for the Digital Mars D compiler.
|
||||||
|
(http://digitalmars.com/d)
|
||||||
|
|
||||||
|
Originally coded by Andy Friesen (andy@ikagames.com)
|
||||||
|
15 November 2003
|
||||||
|
|
||||||
|
Evolved by Russel Winder (russel@winder.org.uk)
|
||||||
|
2010-02-07 onwards
|
||||||
|
|
||||||
|
There are a number of problems with this script at this point in time.
|
||||||
|
The one that irritates the most is the Windows linker setup. The D
|
||||||
|
linker doesn't have a way to add lib paths on the commandline, as far
|
||||||
|
as I can see. You have to specify paths relative to the SConscript or
|
||||||
|
use absolute paths. To hack around it, add '#/blah'. This will link
|
||||||
|
blah.lib from the directory where SConstruct resides.
|
||||||
|
|
||||||
|
Compiler variables:
|
||||||
|
DC - The name of the D compiler to use. Defaults to dmd or gdmd,
|
||||||
|
whichever is found.
|
||||||
|
DPATH - List of paths to search for import modules.
|
||||||
|
DVERSIONS - List of version tags to enable when compiling.
|
||||||
|
DDEBUG - List of debug tags to enable when compiling.
|
||||||
|
|
||||||
|
Linker related variables:
|
||||||
|
LIBS - List of library files to link in.
|
||||||
|
DLINK - Name of the linker to use. Defaults to dmd or gdmd,
|
||||||
|
whichever is found.
|
||||||
|
DLINKFLAGS - List of linker flags.
|
||||||
|
|
||||||
|
Lib tool variables:
|
||||||
|
DLIB - Name of the lib tool to use. Defaults to lib.
|
||||||
|
DLIBFLAGS - List of flags to pass to the lib tool.
|
||||||
|
LIBS - Same as for the linker. (libraries to pull into the .lib)
|
||||||
|
"""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
# a copy of this software and associated documentation files (the
|
||||||
|
# "Software"), to deal in the Software without restriction, including
|
||||||
|
# without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
# permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
# the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||||
|
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
|
||||||
|
__revision__ = "src/engine/SCons/Tool/dmd.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
import SCons.Action
|
||||||
|
import SCons.Builder
|
||||||
|
import SCons.Defaults
|
||||||
|
import SCons.Scanner.D
|
||||||
|
import SCons.Tool
|
||||||
|
|
||||||
|
import SCons.Tool.DCommon
|
||||||
|
|
||||||
|
|
||||||
|
def generate(env):
|
||||||
|
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
|
||||||
|
|
||||||
|
static_obj.add_action('.d', SCons.Defaults.DAction)
|
||||||
|
shared_obj.add_action('.d', SCons.Defaults.ShDAction)
|
||||||
|
static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter)
|
||||||
|
shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter)
|
||||||
|
|
||||||
|
env['DC'] = env.Detect(['dmd', 'gdmd'])
|
||||||
|
env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of$TARGET $SOURCES'
|
||||||
|
env['_DINCFLAGS'] = '$( ${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
|
||||||
|
env['_DVERFLAGS'] = '$( ${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)} $)'
|
||||||
|
env['_DDEBUGFLAGS'] = '$( ${_concat(DDEBUGPREFIX, DDEBUG, DDEBUGSUFFIX, __env__)} $)'
|
||||||
|
env['_DFLAGS'] = '$( ${_concat(DFLAGPREFIX, DFLAGS, DFLAGSUFFIX, __env__)} $)'
|
||||||
|
|
||||||
|
env['SHDC'] = '$DC'
|
||||||
|
env['SHDCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -fPIC -of$TARGET $SOURCES'
|
||||||
|
|
||||||
|
env['DPATH'] = ['#/']
|
||||||
|
env['DFLAGS'] = []
|
||||||
|
env['DVERSIONS'] = []
|
||||||
|
env['DDEBUG'] = []
|
||||||
|
|
||||||
|
if env['DC']:
|
||||||
|
SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
|
||||||
|
|
||||||
|
env['DINCPREFIX'] = '-I'
|
||||||
|
env['DINCSUFFIX'] = ''
|
||||||
|
env['DVERPREFIX'] = '-version='
|
||||||
|
env['DVERSUFFIX'] = ''
|
||||||
|
env['DDEBUGPREFIX'] = '-debug='
|
||||||
|
env['DDEBUGSUFFIX'] = ''
|
||||||
|
env['DFLAGPREFIX'] = '-'
|
||||||
|
env['DFLAGSUFFIX'] = ''
|
||||||
|
env['DFILESUFFIX'] = '.d'
|
||||||
|
|
||||||
|
env['DLINK'] = '$DC'
|
||||||
|
env['DLINKFLAGS'] = SCons.Util.CLVar('')
|
||||||
|
env['DLINKCOM'] = '$DLINK -of$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
|
||||||
|
|
||||||
|
env['DSHLINK'] = '$DC'
|
||||||
|
env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=libphobos2.so')
|
||||||
|
env['SHDLINKCOM'] = '$DLINK -of$TARGET $DSHLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
|
||||||
|
|
||||||
|
env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l'
|
||||||
|
env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else ''
|
||||||
|
env['_DLIBFLAGS'] = '${_stripixes(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}'
|
||||||
|
|
||||||
|
env['DLIBDIRPREFIX'] = '-L-L'
|
||||||
|
env['DLIBDIRSUFFIX'] = ''
|
||||||
|
env['_DLIBDIRFLAGS'] = '$( ${_concat(DLIBDIRPREFIX, LIBPATH, DLIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
|
||||||
|
|
||||||
|
|
||||||
|
env['DLIB'] = 'lib' if env['PLATFORM'] == 'win32' else 'ar cr'
|
||||||
|
env['DLIBCOM'] = '$DLIB $_DLIBFLAGS {0}$TARGET $SOURCES $_DLIBFLAGS'.format('-c ' if env['PLATFORM'] == 'win32' else '')
|
||||||
|
|
||||||
|
#env['_DLIBFLAGS'] = '$( ${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)} $)'
|
||||||
|
|
||||||
|
env['DLIBFLAGPREFIX'] = '-'
|
||||||
|
env['DLIBFLAGSUFFIX'] = ''
|
||||||
|
|
||||||
|
# __RPATH is set to $_RPATH in the platform specification if that
|
||||||
|
# platform supports it.
|
||||||
|
env['DRPATHPREFIX'] = '-L-rpath='
|
||||||
|
env['DRPATHSUFFIX'] = ''
|
||||||
|
env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}'
|
||||||
|
|
||||||
|
SCons.Tool.createStaticLibBuilder(env)
|
||||||
|
|
||||||
|
|
||||||
|
def exists(env):
|
||||||
|
return env.Detect(['dmd', 'gdmd'])
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# tab-width:4
|
||||||
|
# indent-tabs-mode:nil
|
||||||
|
# End:
|
||||||
|
# vim: set expandtab tabstop=4 shiftwidth=4:
|
|
@ -242,7 +242,7 @@ def __xml_scan(node, env, path, arg):
|
||||||
|
|
||||||
styledoc = libxml2.parseFile(xsl_file)
|
styledoc = libxml2.parseFile(xsl_file)
|
||||||
style = libxslt.parseStylesheetDoc(styledoc)
|
style = libxslt.parseStylesheetDoc(styledoc)
|
||||||
doc = libxml2.parseFile(str(node))
|
doc = libxml2.readFile(str(node), None, libxml2.XML_PARSE_NOENT)
|
||||||
result = style.applyStylesheet(doc, None)
|
result = style.applyStylesheet(doc, None)
|
||||||
|
|
||||||
depfiles = []
|
depfiles = []
|
||||||
|
@ -348,7 +348,7 @@ def __xinclude_libxml2(target, source, env):
|
||||||
Resolving XIncludes, using the libxml2 module.
|
Resolving XIncludes, using the libxml2 module.
|
||||||
"""
|
"""
|
||||||
doc = libxml2.readFile(str(source[0]), None, libxml2.XML_PARSE_NOENT)
|
doc = libxml2.readFile(str(source[0]), None, libxml2.XML_PARSE_NOENT)
|
||||||
doc.xincludeProcess()
|
doc.xincludeProcessFlags(libxml2.XML_PARSE_NOENT)
|
||||||
doc.saveFile(str(target[0]))
|
doc.saveFile(str(target[0]))
|
||||||
doc.freeDoc()
|
doc.freeDoc()
|
||||||
|
|
||||||
|
@ -429,6 +429,11 @@ def DocbookEpub(env, target, source=None, *args, **kw):
|
||||||
mime_file.close()
|
mime_file.close()
|
||||||
zf.write(mime_file.name, compress_type = zipfile.ZIP_STORED)
|
zf.write(mime_file.name, compress_type = zipfile.ZIP_STORED)
|
||||||
for s in source:
|
for s in source:
|
||||||
|
if os.path.isfile(str(s)):
|
||||||
|
head, tail = os.path.split(str(s))
|
||||||
|
if not head:
|
||||||
|
continue
|
||||||
|
s = head
|
||||||
for dirpath, dirnames, filenames in os.walk(str(s)):
|
for dirpath, dirnames, filenames in os.walk(str(s)):
|
||||||
for fname in filenames:
|
for fname in filenames:
|
||||||
path = os.path.join(dirpath, fname)
|
path = os.path.join(dirpath, fname)
|
|
@ -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, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/dvi.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/dvi.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Builder
|
import SCons.Builder
|
||||||
import SCons.Tool
|
import SCons.Tool
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/dvipdf.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/dvipdf.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/dvips.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/dvips.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Builder
|
import SCons.Builder
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/f03.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/f03.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
import SCons.Tool
|
import SCons.Tool
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/f77.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/f77.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
import SCons.Scanner.Fortran
|
import SCons.Scanner.Fortran
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/f90.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/f90.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
import SCons.Scanner.Fortran
|
import SCons.Scanner.Fortran
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/f95.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/f95.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Defaults
|
import SCons.Defaults
|
||||||
import SCons.Tool
|
import SCons.Tool
|
|
@ -8,7 +8,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/filesystem.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/filesystem.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons
|
import SCons
|
||||||
from SCons.Tool.install import copyFunc
|
from SCons.Tool.install import copyFunc
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/fortran.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/fortran.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/g++.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/g++.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
|
@ -40,6 +40,8 @@ import subprocess
|
||||||
import SCons.Tool
|
import SCons.Tool
|
||||||
import SCons.Util
|
import SCons.Util
|
||||||
|
|
||||||
|
import gcc
|
||||||
|
|
||||||
cplusplus = __import__('c++', globals(), locals(), [])
|
cplusplus = __import__('c++', globals(), locals(), [])
|
||||||
|
|
||||||
compilers = ['g++']
|
compilers = ['g++']
|
||||||
|
@ -48,9 +50,10 @@ def generate(env):
|
||||||
"""Add Builders and construction variables for g++ to an Environment."""
|
"""Add Builders and construction variables for g++ to an Environment."""
|
||||||
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
|
static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
|
||||||
|
|
||||||
cplusplus.generate(env)
|
if 'CXX' not in env:
|
||||||
|
env['CXX'] = env.Detect(compilers) or compilers[0]
|
||||||
|
|
||||||
env['CXX'] = env.Detect(compilers)
|
cplusplus.generate(env)
|
||||||
|
|
||||||
# platform specific settings
|
# platform specific settings
|
||||||
if env['PLATFORM'] == 'aix':
|
if env['PLATFORM'] == 'aix':
|
||||||
|
@ -62,26 +65,13 @@ def generate(env):
|
||||||
elif env['PLATFORM'] == 'sunos':
|
elif env['PLATFORM'] == 'sunos':
|
||||||
env['SHOBJSUFFIX'] = '.pic.o'
|
env['SHOBJSUFFIX'] = '.pic.o'
|
||||||
# determine compiler version
|
# determine compiler version
|
||||||
if env['CXX']:
|
version = gcc.detect_version(env, env['CXX'])
|
||||||
#pipe = SCons.Action._subproc(env, [env['CXX'], '-dumpversion'],
|
if version:
|
||||||
pipe = SCons.Action._subproc(env, [env['CXX'], '--version'],
|
env['CXXVERSION'] = version
|
||||||
stdin = 'devnull',
|
|
||||||
stderr = 'devnull',
|
|
||||||
stdout = subprocess.PIPE)
|
|
||||||
if pipe.wait() != 0: return
|
|
||||||
# -dumpversion was added in GCC 3.0. As long as we're supporting
|
|
||||||
# GCC versions older than that, we should use --version and a
|
|
||||||
# regular expression.
|
|
||||||
#line = pipe.stdout.read().strip()
|
|
||||||
#if line:
|
|
||||||
# env['CXXVERSION'] = line
|
|
||||||
line = pipe.stdout.readline()
|
|
||||||
match = re.search(r'[0-9]+(\.[0-9]+)+', line)
|
|
||||||
if match:
|
|
||||||
env['CXXVERSION'] = match.group(0)
|
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
return env.Detect(compilers)
|
# is executable, and is a GNU compiler (or accepts '--version' at least)
|
||||||
|
return gcc.detect_version(env, env.Detect(env.get('CXX', compilers)))
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# tab-width:4
|
# tab-width:4
|
|
@ -9,7 +9,7 @@ selection method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
|
# Copyright (c) 2001 - 2014 The SCons Foundation
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining
|
# Permission is hereby granted, free of charge, to any person obtaining
|
||||||
# a copy of this software and associated documentation files (the
|
# 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.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
__revision__ = "src/engine/SCons/Tool/g77.py 2014/03/02 14:18:15 garyo"
|
__revision__ = "src/engine/SCons/Tool/g77.py 2014/09/27 12:51:43 garyo"
|
||||||
|
|
||||||
import SCons.Util
|
import SCons.Util
|
||||||
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
|
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue