2010-08-25 06:57:11 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
|
|
import re
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import string
|
|
|
|
import subprocess
|
2010-08-25 09:14:57 -05:00
|
|
|
import optparse
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
|
|
|
|
coriolisPattern = re.compile ( r".*coriolis.*" )
|
|
|
|
|
|
|
|
|
|
|
|
def stripPath ( pathName ):
|
|
|
|
pathEnv = os.getenv ( pathName )
|
|
|
|
if not pathEnv: return ""
|
|
|
|
|
|
|
|
pathList = string.split ( pathEnv, ':' )
|
|
|
|
strippedList = []
|
|
|
|
for pathElement in pathList:
|
|
|
|
if not coriolisPattern.match(pathElement):
|
|
|
|
strippedList += [ pathElement ]
|
|
|
|
|
|
|
|
if len(strippedList) == 0: return ""
|
|
|
|
|
|
|
|
strippedEnv = strippedList[0]
|
|
|
|
for pathElement in strippedList[1:]:
|
|
|
|
strippedEnv += ":" + pathElement
|
|
|
|
|
|
|
|
return strippedEnv
|
|
|
|
|
|
|
|
|
|
|
|
def guessOs ():
|
2014-12-05 11:50:15 -06:00
|
|
|
useDevtoolset2 = False
|
2014-12-09 16:49:46 -06:00
|
|
|
osSlsoc7x_64 = re.compile (".*Linux.*el7.*x86_64.*")
|
2012-11-16 06:46:27 -06:00
|
|
|
osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*")
|
|
|
|
osSlsoc6x = re.compile (".*Linux.*(el|slsoc)6.*")
|
|
|
|
osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*")
|
|
|
|
osSLSoC5x = re.compile (".*Linux.*(el5|2.6.23.13.*SoC).*")
|
2015-02-27 11:16:03 -06:00
|
|
|
osFedora_64 = re.compile (".*Linux.*fc.*x86_64.*")
|
|
|
|
osFedora = re.compile (".*Linux.*fc.*")
|
2012-11-16 06:46:27 -06:00
|
|
|
osLinux_64 = re.compile (".*Linux.*x86_64.*")
|
|
|
|
osLinux = re.compile (".*Linux.*")
|
|
|
|
osDarwin = re.compile (".*Darwin.*")
|
|
|
|
osUbuntu1004 = re.compile (".*Linux.*ubuntu.*")
|
|
|
|
osUbuntu1004_64 = re.compile (".*Linux.*ubuntu.*x86_64.*")
|
|
|
|
osFreeBSD8x_amd64 = re.compile (".*FreeBSD 8.*amd64.*")
|
|
|
|
osFreeBSD8x_64 = re.compile (".*FreeBSD 8.*x86_64.*")
|
|
|
|
osFreeBSD8x = re.compile (".*FreeBSD 8.*")
|
Support for Windows/Cygwin, part 2.
* Change: In bootstrap, in ccb, builder and coriolisEnv.py, correct detection
of the windows architecture (32 or 64 bits). Under Cygwin, add the
directory of the dll into the PATH also. Uses "site-package" as the
location of Python modules (*not* "dist-package").
Use gnu++0x under Cygwin instead of c++11.
* Change: In Etesian, if Coloquinte is not found, do not stop the compilation,
just disable the tool altogether.
* Change: In Hurricane, In Backtrace, disable backtrace under Cygwin as it
uses features specific of the glibc.
* Change: In Knik, use HUGE_VAL instead of HUGE (not present under Cygwin),
add the <cmath> header.
* Change: In Unicorn, Coloquinte no longer stops the compilation.
2014-07-22 17:55:50 -05:00
|
|
|
osCygwinW7_64 = re.compile (".*CYGWIN_NT-6\.1.*x86_64.*")
|
|
|
|
osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*i686.*")
|
|
|
|
osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3].*x86_64.*")
|
|
|
|
osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*i686.*")
|
2015-10-02 08:59:01 -05:00
|
|
|
osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
|
|
|
|
osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
|
|
|
|
lines = uname.stdout.readlines()
|
|
|
|
|
2010-08-25 08:03:30 -05:00
|
|
|
libDir="lib"
|
2014-12-09 16:49:46 -06:00
|
|
|
if osSlsoc7x_64.match(lines[0]):
|
|
|
|
osType = "Linux.el7_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osSlsoc6x_64.match(lines[0]):
|
2014-12-05 11:50:15 -06:00
|
|
|
osType = "Linux.slsoc6x_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
useDevtoolset2 = True
|
|
|
|
elif osSlsoc6x.match(lines[0]):
|
|
|
|
osType = "Linux.slsoc6x"
|
|
|
|
useDevtoolset2 = True
|
2011-04-12 15:36:00 -05:00
|
|
|
elif osSLSoC5x_64.match(lines[0]):
|
2014-12-05 11:50:15 -06:00
|
|
|
osType = "Linux.SLSoC5x_64"
|
|
|
|
libDir = "lib64"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osSLSoC5x.match(lines[0]):
|
|
|
|
osType = "Linux.SLSoC5x"
|
2015-02-27 11:16:03 -06:00
|
|
|
elif osFedora_64.match(lines[0]):
|
|
|
|
osType = "Linux.fc_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osFedora.match(lines[0]):
|
|
|
|
osType = "Linux.fc"
|
2011-02-02 04:40:25 -06:00
|
|
|
elif osUbuntu1004.match(lines[0]):
|
|
|
|
osType = "Linux.Ubuntu1004"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osUbuntu1004_64.match(lines[0]):
|
|
|
|
osType = "Linux.Ubuntu1004_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osLinux_64.match(lines[0]):
|
|
|
|
osType = "Linux.x86_64"
|
2015-05-03 14:10:42 -05:00
|
|
|
if(os.path.exists("/usr/lib64/")):
|
|
|
|
libDir = "lib64"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osLinux.match(lines[0]):
|
|
|
|
osType = "Linux.i386"
|
2012-11-16 06:46:27 -06:00
|
|
|
elif osFreeBSD8x_64.match(lines[0]):
|
|
|
|
osType = "FreeBSD.8x.x86_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osFreeBSD8x_amd64.match(lines[0]):
|
|
|
|
osType = "FreeBSD.8x.amd64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osFreeBSD8x.match(lines[0]):
|
|
|
|
osType = "FreeBSD.8x.i386"
|
2011-02-09 09:47:27 -06:00
|
|
|
elif osDarwin.match(lines[0]):
|
|
|
|
osType = "Darwin"
|
2014-07-13 06:14:49 -05:00
|
|
|
elif osCygwinW7_64.match(lines[0]):
|
|
|
|
osType = "Cygwin.W7_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osCygwinW7.match(lines[0]):
|
|
|
|
osType = "Cygwin.W7"
|
|
|
|
elif osCygwinW8_64.match(lines[0]):
|
|
|
|
osType = "Cygwin.W8_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osCygwinW8.match(lines[0]):
|
|
|
|
osType = "Cygwin.W8"
|
2015-10-02 08:59:01 -05:00
|
|
|
elif osCygwinW10_64.match(lines[0]):
|
|
|
|
osType = "Cygwin.W10_64"
|
|
|
|
libDir = "lib64"
|
|
|
|
elif osCygwinW10.match(lines[0]):
|
|
|
|
osType = "Cygwin.W10"
|
2010-08-25 06:57:11 -05:00
|
|
|
else:
|
2014-07-13 06:14:49 -05:00
|
|
|
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
|
|
|
|
osType = uname.stdout.readlines()[0][:-1]
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2014-12-09 16:49:46 -06:00
|
|
|
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1]
|
|
|
|
print " (using: \"%s\")" % osType
|
2015-02-03 16:41:55 -06:00
|
|
|
|
|
|
|
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
|
2015-06-14 08:24:34 -05:00
|
|
|
if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset2 = False
|
2015-04-25 11:27:04 -05:00
|
|
|
|
|
|
|
if libDir == 'lib64' and not os.path.exists('/usr/lib64'):
|
|
|
|
libDir = 'lib'
|
2010-08-25 06:57:11 -05:00
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
return (osType,libDir,useDevtoolset2)
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
osType,libDir,useDevtoolset2 = guessOs()
|
|
|
|
buildType = "Release"
|
|
|
|
linkType = "Shared"
|
|
|
|
rootDir = None
|
2010-08-25 09:14:57 -05:00
|
|
|
|
|
|
|
parser = optparse.OptionParser ()
|
|
|
|
# Build relateds.
|
2015-05-09 16:11:44 -05:00
|
|
|
parser.add_option ( "--query-inst-root", action="store_true" , dest="queryInstRoot" )
|
|
|
|
parser.add_option ( "--query-isys-root", action="store_true" , dest="queryISysRoot" )
|
|
|
|
parser.add_option ( "--csh" , action="store_true" , dest="csh" )
|
|
|
|
parser.add_option ( "--release" , action="store_true" , dest="release" )
|
|
|
|
parser.add_option ( "--debug" , action="store_true" , dest="debug" )
|
|
|
|
parser.add_option ( "--devel" , action="store_true" , dest="devel" )
|
|
|
|
parser.add_option ( "--static" , action="store_true" , dest="static" )
|
|
|
|
parser.add_option ( "--shared" , action="store_true" , dest="shared" )
|
|
|
|
parser.add_option ( "--chams" , action="store_true" , dest="chams" )
|
|
|
|
parser.add_option ( "--no-python" , action="store_true" , dest="nopython" )
|
|
|
|
parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" )
|
2010-08-25 09:14:57 -05:00
|
|
|
( options, args ) = parser.parse_args ()
|
|
|
|
|
2011-01-09 17:06:07 -06:00
|
|
|
if options.release: buildType = "Release"
|
|
|
|
if options.debug: buildType = "Debug"
|
|
|
|
if options.devel: buildType = "Debug"
|
|
|
|
if options.static: linkType = "Static"
|
|
|
|
if options.shared: linkType = "Shared"
|
|
|
|
if options.rootDir: rootDir = options.rootDir
|
2010-08-25 06:57:11 -05:00
|
|
|
|
|
|
|
strippedPath = stripPath ( "PATH" )
|
|
|
|
strippedLibraryPath = stripPath ( "LD_LIBRARY_PATH" )
|
|
|
|
strippedPythonPath = stripPath ( "PYTHONPATH" )
|
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
shellScriptSh = \
|
2014-12-05 11:50:15 -06:00
|
|
|
'echo "%(MESSAGE)s";' \
|
|
|
|
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
|
|
|
|
'PATH="%(PATH)s";' \
|
|
|
|
'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \
|
|
|
|
'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \
|
|
|
|
'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
|
|
|
|
'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;'
|
2012-11-16 06:46:27 -06:00
|
|
|
|
|
|
|
shellScriptCsh = \
|
2014-12-05 11:50:15 -06:00
|
|
|
'echo "%(MESSAGE)s";' \
|
|
|
|
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
|
|
|
|
'setenv PATH "%(PATH)s";' \
|
|
|
|
'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \
|
|
|
|
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";' \
|
|
|
|
'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";'
|
2012-11-16 06:46:27 -06:00
|
|
|
|
|
|
|
buildDir = buildType + "." + linkType
|
|
|
|
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
|
|
|
#print "echo \"Script Location: %s\";" % scriptDir,
|
|
|
|
if scriptDir.startswith("/etc/coriolis2"):
|
|
|
|
coriolisTop = "/usr"
|
|
|
|
sysconfDir = scriptDir
|
|
|
|
shellMessage = "Using system-wide Coriolis 2 (/usr)"
|
2015-06-15 10:01:24 -05:00
|
|
|
elif scriptDir.startswith("/opt/rh/devtoolset-2/root/etc/coriolis2"):
|
New coriolis launcher. Configuration files cleanup.
* Change: In CRL Core, simplify the loading sequence. The technology,
both symbolic and real is now loaded directly from coriolisInit.py
and not through the Alliance loader. This was a leftover from the
time configuration was in XML. Remove others traces of XML loading.
Remove SYMB_TECHNO_NAME, REAL_TECHNO_NAME & DISPLAY from the Alliance
environement, as they was no longer used.
Note that technology *still* need to be loader *after* Alliance
framework has been initialized.
Gauge information is moved from <alliance.conf> to <kite.conf>.
* Bug: In Coloquinte, in optimization_subproblems.cxx static variables
must not be inlined. Generate a problem when linking in debug mode
(seems the symbol gets optimised out).
* Bug: In Katabatic, in Grid::getGCell(), when the coordinate is *outside*
the area, do not try to find a GCell, directly return NULL.
* New: In Unicorn, create a generic command launcher named "coriolis" which
automatically take cares of all environement setup, then run a command
by default, it's <cgt>, but it can be anything. For example: <zsh>.
2015-04-13 11:54:09 -05:00
|
|
|
coriolisTop = "/opt/rh/devtoolset-2/root/usr"
|
|
|
|
sysconfDir = scriptDir
|
|
|
|
shellMessage = "Using system-wide devtoolset-2 Coriolis 2 (/opt/rh/devtoolset-2/root/usr)"
|
2015-06-15 10:07:25 -05:00
|
|
|
elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"):
|
2015-06-15 10:01:24 -05:00
|
|
|
rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x"
|
|
|
|
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
|
|
|
|
sysconfDir = scriptDir
|
|
|
|
shellMessage = "Using Nightly build Coriolis 2 (%s)" % coriolisTop
|
2012-11-16 06:46:27 -06:00
|
|
|
elif scriptDir.startswith("/users/outil/coriolis/coriolis-2.x/") \
|
|
|
|
or scriptDir.startswith("/soc/coriolis2/"):
|
|
|
|
coriolisTop = "/soc/coriolis2"
|
|
|
|
sysconfDir = coriolisTop + "/etc/coriolis2"
|
|
|
|
shellMessage = "Using SoC network-wide Coriolis 2 (/soc/coriolis2)"
|
|
|
|
else:
|
2010-08-25 09:14:57 -05:00
|
|
|
if not rootDir:
|
2012-11-16 06:46:27 -06:00
|
|
|
rootDir = os.getenv("HOME") + "/coriolis-2.x"
|
|
|
|
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
|
|
|
|
sysconfDir = coriolisTop + "/etc/coriolis2"
|
|
|
|
shellMessage = "Using user-selected Coriolis 2 (%s)" % rootDir
|
|
|
|
|
Support for Windows/Cygwin, part 2.
* Change: In bootstrap, in ccb, builder and coriolisEnv.py, correct detection
of the windows architecture (32 or 64 bits). Under Cygwin, add the
directory of the dll into the PATH also. Uses "site-package" as the
location of Python modules (*not* "dist-package").
Use gnu++0x under Cygwin instead of c++11.
* Change: In Etesian, if Coloquinte is not found, do not stop the compilation,
just disable the tool altogether.
* Change: In Hurricane, In Backtrace, disable backtrace under Cygwin as it
uses features specific of the glibc.
* Change: In Knik, use HUGE_VAL instead of HUGE (not present under Cygwin),
add the <cmath> header.
* Change: In Unicorn, Coloquinte no longer stops the compilation.
2014-07-22 17:55:50 -05:00
|
|
|
if osType.startswith("Cygwin"):
|
|
|
|
strippedPath = "%s/%s:%s" % ( coriolisTop, libDir, strippedPath )
|
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
absLibDir = "%s/%s" % ( coriolisTop, libDir )
|
|
|
|
strippedPath = "%s/bin:%s" % ( coriolisTop, strippedPath )
|
|
|
|
strippedLibraryPath = "%s:%s" % ( absLibDir , strippedLibraryPath )
|
|
|
|
|
|
|
|
if not options.nopython:
|
|
|
|
pyVersion = sys.version_info
|
|
|
|
version = "%d.%d" % (pyVersion[0],pyVersion[1])
|
Support for Windows/Cygwin, part 2.
* Change: In bootstrap, in ccb, builder and coriolisEnv.py, correct detection
of the windows architecture (32 or 64 bits). Under Cygwin, add the
directory of the dll into the PATH also. Uses "site-package" as the
location of Python modules (*not* "dist-package").
Use gnu++0x under Cygwin instead of c++11.
* Change: In Etesian, if Coloquinte is not found, do not stop the compilation,
just disable the tool altogether.
* Change: In Hurricane, In Backtrace, disable backtrace under Cygwin as it
uses features specific of the glibc.
* Change: In Knik, use HUGE_VAL instead of HUGE (not present under Cygwin),
add the <cmath> header.
* Change: In Unicorn, Coloquinte no longer stops the compilation.
2014-07-22 17:55:50 -05:00
|
|
|
if osType.startswith("Linux.SL") \
|
|
|
|
or osType.startswith("Linux.sl") \
|
Integration of the latest Coloquinte in Etesian & misc modifs.
* New: In Bootstrap, in Builder & coriolisEnv.py support for RHEL7/SL7.
The sub-directory name is 'el7_64'.
In qt_setup() add QtSvg to list of Qt5 & Qt4 used libraries.
* New: In Hurricane, In Cell add a placeholder for flags. First use to
store whether the Nets have been transhierarchically flatteneds.
* New: In Hurricane, In NetRoutingState add an Unconnected flag for
more accurate diagnosis.
* New: Hurricane, in CellViewer add an entry menu for stress tests.
The script must be named "stressScript.py" in the cwd.
* Change: In CRL Core, in display.conf add a scaling parameter for the
display threhold of the layer. This way we can adapt to different
standard cells height.
* Change: In CRL Core, in ISPD05 bookshelf loader, use the pitch of the
cell gauge instead of a hard-wired 5.0.
* Change: In Cumulus, in ClockTreePlugin, add support for Etesian placer
and a new configuration parameter to choose between Mauka/Etesian.
* New: In Etesian, support for the latest Coloquinte.
Add feed insertion stage.
* Bug: In Kite, In BuildPowerRails, check that _ck is not NULL before
tring to access it's name...
* Change: In Kite, check if the Cell has it's Nets flattened before
doing it (or not).
2015-02-01 16:24:13 -06:00
|
|
|
or osType.startswith("Linux.el") \
|
2015-02-27 11:16:03 -06:00
|
|
|
or osType.startswith("Linux.fc") \
|
Support for Windows/Cygwin, part 2.
* Change: In bootstrap, in ccb, builder and coriolisEnv.py, correct detection
of the windows architecture (32 or 64 bits). Under Cygwin, add the
directory of the dll into the PATH also. Uses "site-package" as the
location of Python modules (*not* "dist-package").
Use gnu++0x under Cygwin instead of c++11.
* Change: In Etesian, if Coloquinte is not found, do not stop the compilation,
just disable the tool altogether.
* Change: In Hurricane, In Backtrace, disable backtrace under Cygwin as it
uses features specific of the glibc.
* Change: In Knik, use HUGE_VAL instead of HUGE (not present under Cygwin),
add the <cmath> header.
* Change: In Unicorn, Coloquinte no longer stops the compilation.
2014-07-22 17:55:50 -05:00
|
|
|
or osType.startswith("Darwin") \
|
|
|
|
or osType.startswith("Cygwin"):
|
2012-11-16 06:46:27 -06:00
|
|
|
sitePackagesDir = "%s/python%s/site-packages" % (absLibDir,version)
|
2011-01-09 16:55:51 -06:00
|
|
|
else:
|
2012-11-16 06:46:27 -06:00
|
|
|
sitePackagesDir = "%s/python%s/dist-packages" % (absLibDir,version)
|
|
|
|
|
2014-09-07 16:16:04 -05:00
|
|
|
strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/cumulus/plugins:" % (sitePackagesDir) + strippedPythonPath
|
|
|
|
strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";' \
|
|
|
|
'export PYTHONPATH;'
|
2014-05-13 10:13:55 -05:00
|
|
|
shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";'
|
2012-11-16 06:46:27 -06:00
|
|
|
|
2013-04-26 10:32:59 -05:00
|
|
|
if osType == "Darwin":
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \
|
|
|
|
'export DYLD_LIBRARY_PATH;'
|
|
|
|
shellScriptCsh += 'setenv DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";'
|
2013-04-26 10:32:59 -05:00
|
|
|
else:
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \
|
|
|
|
'export LD_LIBRARY_PATH;'
|
|
|
|
shellScriptCsh += 'setenv LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";'
|
2014-05-13 10:13:55 -05:00
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
shellScriptSh += "hash -r;"
|
|
|
|
shellScriptCsh += "rehash;"
|
2013-04-26 10:32:59 -05:00
|
|
|
|
2012-11-16 06:46:27 -06:00
|
|
|
if options.csh: shellScript = shellScriptCsh
|
|
|
|
else: shellScript = shellScriptSh
|
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
evalScript = shellScript % { "PATH" : strippedPath
|
|
|
|
, "LD_LIBRARY_PATH" : strippedLibraryPath
|
|
|
|
, "PYTHONPATH" : strippedPythonPath
|
|
|
|
, "BOOTSTRAP_TOP" : coriolisTop
|
|
|
|
, "CORIOLIS_TOP" : coriolisTop
|
|
|
|
, "SYSCONF_DIR" : sysconfDir
|
|
|
|
, "MESSAGE" : shellMessage
|
|
|
|
, "buildDir" : buildDir
|
|
|
|
}
|
|
|
|
if useDevtoolset2:
|
|
|
|
evalScript = '%s scl enable devtoolset-2 ${SHELL}' % evalScript
|
|
|
|
|
2015-05-09 16:11:44 -05:00
|
|
|
if options.queryISysRoot:
|
|
|
|
print '%s/%s' % (rootDir,osType)
|
|
|
|
sys.exit( 0 )
|
|
|
|
|
|
|
|
if options.queryInstRoot:
|
|
|
|
print coriolisTop
|
|
|
|
sys.exit( 0 )
|
|
|
|
|
2014-12-05 11:50:15 -06:00
|
|
|
print evalScript
|