Tools/BaseTools/BuildEnv.py:

Added support for including BaseTools into PATH environment variable.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4144 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2007-10-16 22:34:16 +00:00
parent 9a5a9f0d75
commit 33bb799a07
1 changed files with 13 additions and 0 deletions

View File

@ -244,9 +244,22 @@ class SetupBuildEnvironmentApp:
print 'Storing environment configuration into', print 'Storing environment configuration into',
print self.RelativeToWorkspace(scriptFilename) print self.RelativeToWorkspace(scriptFilename)
script = open(scriptFilename, 'w') script = open(scriptFilename, 'w')
print >> script, 'export WORKSPACE="%s"' % workspace print >> script, 'export WORKSPACE="%s"' % workspace
print >> script, 'export TOOLCHAIN="%s"' % self.conf['compiler'] print >> script, 'export TOOLCHAIN="%s"' % self.conf['compiler']
print >> script, 'export EDK_CC_PATH_PREFIX="%s"' % self.conf['compiler-prefix'] print >> script, 'export EDK_CC_PATH_PREFIX="%s"' % self.conf['compiler-prefix']
#
# Change PATH variable
#
newPath = os.environ['PATH'].split(os.path.pathsep)
binDir = \
os.path.join(workspace, 'Tools', 'BaseTools', 'Bin', sys.platform.title())
if binDir not in newPath:
newPath.append(binDir)
newPath = os.path.pathsep.join(newPath)
print >> script, 'export PATH=%s' % newPath
script.close() script.close()
def RelativeToWorkspace(self, path): def RelativeToWorkspace(self, path):