summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-17 02:19:35 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-17 02:19:35 +0000
commit6e98e263266df31993c266d91438da46ac575a2f (patch)
tree782aadab0a89be7009073b1cb16ab3b9573a7d86 /BaseTools
parentb2401e6e1f437fdcc3f8d09b5f436c195b62e2bd (diff)
downloadedk2-platforms-6e98e263266df31993c266d91438da46ac575a2f.tar.xz
Make scripts work from $WORKSPACE/BaseTools.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4152 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/BuildEnv6
-rwxr-xr-xBaseTools/BuildEnv.py12
2 files changed, 12 insertions, 6 deletions
diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
index fcca6c9069..08a84d4352 100644
--- a/BaseTools/BuildEnv
+++ b/BaseTools/BuildEnv
@@ -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
diff --git a/BaseTools/BuildEnv.py b/BaseTools/BuildEnv.py
index 7b3d192a0a..98b5ca1f45 100755
--- a/BaseTools/BuildEnv.py
+++ b/BaseTools/BuildEnv.py
@@ -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)