X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FBuildEnv;h=6a1281b96b2a519c1dc989a45381ee881a8e93ac;hb=edafa0bbe423d5d6129f4d18de176dfd73b6cfcf;hp=ca8a5781f61c2e5d215a2249ed3502f32790fd55;hpb=14c48571ae607277d11132c5e085d3ec1f12d236;p=mirror_edk2.git diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv index ca8a5781f6..6a1281b96b 100755 --- a/BaseTools/BuildEnv +++ b/BaseTools/BuildEnv @@ -1,5 +1,8 @@ +## @file +# Setup the environment for unix-like systems running a bash-like shell. +# This file must be "sourced" not merely executed. For example: ". edksetup.sh" # -# Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -7,10 +10,6 @@ # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -# -# Setup the environment for unix-like systems running a bash-like shell. -# This file must be "sourced" not merely executed. For example: ". edksetup.sh" # SetWorkspace() { @@ -23,14 +22,6 @@ SetWorkspace() { return 0 fi - if [ ! ${BASH_SOURCE[0]} -ef ./BaseTools/BuildEnv ] - then - echo Run this script from the base of your tree. For example: - echo " cd /Path/To/Edk/Root" - echo " . BaseTools/BuildEnv" - return 1 - fi - # # Set $WORKSPACE # @@ -160,6 +151,14 @@ GetEdkToolsPathBinDirectory() { echo $EDK_TOOLS_PATH_BIN } +AddDirToStartOfPath() { + DIRNAME=$1 + PATH=$DIRNAME:$DIRNAME:$DIRNAME:$PATH + PATH=${PATH//$DIRNAME:/} + PATH=$DIRNAME:$PATH + export PATH +} + AddEdkToolsToPath() { # @@ -172,18 +171,8 @@ AddEdkToolsToPath() { EDK_TOOLS_PATH_BIN=`GetEdkToolsPathBinDirectory` - if [ ! -e $EDK_TOOLS_PATH_BIN ] - then - echo "Unable to find expected bin path under \$EDK_TOOLS_PATH!" - echo "> $EDK_TOOLS_PATH_BIN" - return 1 - fi - - if [ "${PATH/$EDK_TOOLS_PATH_BIN/}" == "$PATH" ] - then - export PATH=$EDK_TOOLS_PATH_BIN:$PATH - return 0 - fi + AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike + AddDirToStartOfPath $EDK_TOOLS_PATH_BIN } @@ -208,7 +197,6 @@ CopySingleTemplateFile() { CopyTemplateFiles() { CopySingleTemplateFile build_rule - CopySingleTemplateFile FrameworkDatabase CopySingleTemplateFile tools_def CopySingleTemplateFile target