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.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paolo Bonzini <[email protected]>

--- a/edksetup.sh
+++ b/edksetup.sh
@@ -35,11 +35,14 @@
 
 function SetupEnv()
 {
-  if [ -z "$WORKSPACE" ]
+  if [ -n "$WORKSPACE" ]
   then
-    . BaseTools/BuildEnv $*
-  else
     . $WORKSPACE/BaseTools/BuildEnv $*
+  elif [ -n "$EDK_TOOLS_PATH" ]
+  then
+    . $EDK_TOOLS_PATH/BuildEnv $*
+  else
+    . BaseTools/BuildEnv $*
   fi
 }
 

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to