]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/build.sh
Fix issue where the script assumed tools are in Bin, but they are still in BinWrapper...
[mirror_edk2.git] / UnixPkg / build.sh
index 2770019a1f7b7dd9d1b2e39c153c94b5a80de0f8..851e59fefa3085b0374a4f76168e4121add90c01 100755 (executable)
@@ -22,6 +22,10 @@ if [ -z "$WORKSPACE" ]
 then
   echo Initializing workspace
   cd ..
+# This version is for the tools in the BaseTools project.
+# this assumes svn pulls have the same root dir
+#  export EDK_TOOLS_PATH=`pwd`/../BaseTools
+# This version is for the tools source in edk2
   export EDK_TOOLS_PATH=`pwd`/BaseTools
   echo $EDK_TOOLS_PATH
   source edksetup.sh BaseTools
@@ -53,8 +57,13 @@ BUILD_ROOT_ARCH=$WORKSPACE/Build/Unix/DEBUG_"$TARGET_TOOLS"/IA32
 
 if  [[ ! -f `which build` || ! -f `which GenFv` ]];
 then
-  # build the tools if they don't yet exist
-  echo Building tools
+  # build the tools if they don't yet exist. Bin scheme
+  echo Building tools as they are not in the path
+  make -C $WORKSPACE/BaseTools
+elif [[ ( -f `which build` ||  -f `which GenFv` )  && ! -d  $EDK_TOOLS_PATH/Source/C/bin ]];
+then
+  # build the tools if they don't yet exist. BinWrapper scheme
+  echo Building tools no $EDK_TOOLS_PATH/Source/C/bin directory
   make -C $WORKSPACE/BaseTools
 else
   echo using prebuilt tools
@@ -90,7 +99,8 @@ done
 #
 echo $PATH
 echo `which build`
-build -p $WORKSPACE/EdkShellPkg/EdkShellPkg.dsc -a IA32 -t $TARGET_TOOLS $1 $2 $3 $4 $5 $6 $7 $8
+# Uncomment this if you want to build the shell. 
+#build -p $WORKSPACE/EdkShellPkg/EdkShellPkg.dsc -a IA32 -t $TARGET_TOOLS $1 $2 $3 $4 $5 $6 $7 $8
 build -p $WORKSPACE/UnixPkg/UnixPkg.dsc         -a IA32 -t $TARGET_TOOLS $1 $2 $3 $4 $5 $6 $7 $8
 exit $?