Skip to content

Commit

Permalink
edksetup.sh: Look for BuildEnv under EDK_TOOLS_PATH
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bonzini authored and jljusten committed Jul 28, 2014
1 parent dc4ad15 commit 7bc1421
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions edksetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 7bc1421

Please sign in to comment.