summaryrefslogtreecommitdiff
path: root/edksetup.sh
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-07-28 17:37:35 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-07-28 17:37:35 +0000
commit7bc14212b3f640f34c343e38c508ecfd5e8409e5 (patch)
tree7c7354e5cedbd57758e469ae8792738d4e32ff1d /edksetup.sh
parentdc4ad1532e59fd1a185d6b90d1c2a92cf8713f40 (diff)
downloadedk2-platforms-7bc14212b3f640f34c343e38c508ecfd5e8409e5.tar.xz
edksetup.sh: Look for BuildEnv under EDK_TOOLS_PATH
EDK_TOOLS_PATH is basically a replacement for $WORKSPACE/BaseTools. It makes sense to check for BuildEnv there, then, if $WORKSPACE is absent but $EDK_TOOLS_PATH is present. With this patch, it is possible to separately package tools in /usr and use them compile EDK2 (doing "rm -rf BaseTools" in the EDK2 tree). This is desirable for OS distributions that need to distribute the tools in a "free software" repository and OVMF in a "non-free software" repository; bundling the same code in two different packages causes confusion. It is also simpler for distros because the build process for BaseTools and OVMF is completely different. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15700 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edksetup.sh')
-rwxr-xr-xedksetup.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/edksetup.sh b/edksetup.sh
index 0b7e33fd77..f00154e25a 100755
--- a/edksetup.sh
+++ b/edksetup.sh
@@ -35,11 +35,14 @@ function HelpMsg()
function SetupEnv()
{
- if [ -z "$WORKSPACE" ]
+ if [ -n "$EDK_TOOLS_PATH" ]
+ then
+ . $EDK_TOOLS_PATH/BuildEnv $*
+ elif [ -n "$WORKSPACE" ]
then
- . BaseTools/BuildEnv $*
- else
. $WORKSPACE/BaseTools/BuildEnv $*
+ else
+ . BaseTools/BuildEnv $*
fi
}