mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
Make scripts work from $WORKSPACE/BaseTools.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4152 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b2401e6e1f
commit
6e98e26326
@ -11,11 +11,11 @@
|
||||
# Setup the environment for unix-like systems running a bash-like shell.
|
||||
# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
|
||||
|
||||
if [ ! -e ./Tools/BaseTools/BuildEnv.py ]
|
||||
if [ ! -e ./BaseTools/BuildEnv.py ]
|
||||
then
|
||||
echo Run this script from the base of your tree. For example:
|
||||
echo " cd /Path/To/Edk/Root"
|
||||
echo " . Tools/BuildEnv"
|
||||
echo " . BaseTools/BuildEnv"
|
||||
return
|
||||
fi
|
||||
|
||||
@ -23,7 +23,7 @@ fi
|
||||
# First, we run a python tool that will ask the user to configure
|
||||
# the environment in a (relatively) user friendly manner.
|
||||
#
|
||||
python ./Tools/BaseTools/BuildEnv.py $*
|
||||
python ./BaseTools/BuildEnv.py $*
|
||||
|
||||
#
|
||||
# The python tool will write ./Conf/BuildEnv.sh to actually configure
|
||||
|
@ -65,7 +65,7 @@ class SetupBuildEnvironmentApp:
|
||||
}
|
||||
|
||||
def ProcessCommandLine(self):
|
||||
Parser = OptionParser(description=__copyright__,version=__version__,prog="Tools/BuildEnv")
|
||||
Parser = OptionParser(description=__copyright__,version=__version__,prog="BaseTools/BuildEnv")
|
||||
Parser.add_option("-q", "--quiet", action="store_true", type=None, help="Disable all messages except FATAL ERRORS.")
|
||||
Parser.add_option("-v", "--verbose", action="store_true", type=None, help="Turn on verbose output with informational messages printed, "\
|
||||
"including library instances selected, final dependency expression, "\
|
||||
@ -198,7 +198,7 @@ class SetupBuildEnvironmentApp:
|
||||
todo = self.conf['templates and Conf directory']
|
||||
workspace = os.path.realpath(self.Opt.workspace)
|
||||
templatesDir = \
|
||||
os.path.join(workspace, 'Tools', 'BaseTools', 'ConfTemplates', sys.platform.title())
|
||||
os.path.join(workspace, 'BaseTools', 'ConfTemplates', sys.platform.title())
|
||||
confDir = \
|
||||
os.path.join(workspace, 'Conf')
|
||||
print
|
||||
@ -249,12 +249,18 @@ class SetupBuildEnvironmentApp:
|
||||
print >> script, 'export TOOLCHAIN="%s"' % self.conf['compiler']
|
||||
print >> script, 'export EDK_CC_PATH_PREFIX="%s"' % self.conf['compiler-prefix']
|
||||
|
||||
EDK_TOOLS_PATH = os.path.join(workspace, 'BaseTools')
|
||||
print >> script, 'if [ $EDK_TOOLS_PATH=="" ]'
|
||||
print >> script, 'then'
|
||||
print >> script, ' export EDK_TOOLS_PATH="%s"' % EDK_TOOLS_PATH
|
||||
print >> script, 'fi'
|
||||
|
||||
#
|
||||
# Change PATH variable
|
||||
#
|
||||
newPath = os.environ['PATH'].split(os.path.pathsep)
|
||||
binDir = \
|
||||
os.path.join(workspace, 'Tools', 'BaseTools', 'Bin', sys.platform.title())
|
||||
os.path.join(workspace, 'BaseTools', 'Bin', sys.platform.title())
|
||||
if binDir not in newPath:
|
||||
newPath.append(binDir)
|
||||
newPath = os.path.pathsep.join(newPath)
|
||||
|
Loading…
x
Reference in New Issue
Block a user