]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/BinWrappers/PosixLike/VfrCompile
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / BaseTools / BinWrappers / PosixLike / VfrCompile
CommitLineData
5ef6e0d3 1#!/usr/bin/env bash
5ef6e0d3 2
5e407648
CD
3full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
4dir=$(dirname "$full_cmd")
5cmd=${full_cmd##*/}
5ef6e0d3 6
5e407648 7if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]
5ef6e0d3 8then
5e407648
CD
9 exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"
10elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]
5ef6e0d3 11then
5e407648 12 if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]
5ef6e0d3 13 then
5e407648
CD
14 echo "BaseTools C Tool binary was not found ($cmd)"
15 echo "You may need to run:"
5ef6e0d3
LG
16 echo " make -C $EDK_TOOLS_PATH/Source/C"
17 else
5e407648 18 exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"
5ef6e0d3 19 fi
5e407648 20elif [ -e "$dir/../../Source/C/bin/$cmd" ]
5ef6e0d3 21then
5e407648 22 exec "$dir/../../Source/C/bin/$cmd" "$@"
5ef6e0d3 23else
5e407648
CD
24 echo "Unable to find the real '$cmd' to run"
25 echo "This message was printed by"
5ef6e0d3 26 echo " $0"
5e407648 27 exit 127
5ef6e0d3
LG
28fi
29