diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2013-02-12 17:38:40 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2013-02-12 17:38:40 +0000 |
commit | 0ea0199e9e61983f95a1c7b7281c46c62c372a67 (patch) | |
tree | 3927ab24a60bc448ffe99f9b6419e91b56e728b2 | |
parent | 07a1f2d31cb243e67d9827f3e3a41d8b2e8be2d3 (diff) | |
parent | 8a8b5c1662ae17cdc7237212c5148a366f49738f (diff) |
Merge branch 'linaro-topic-panda' into linaro-tracking-2013.02linaro-uefi-2013.02-rc4
-rwxr-xr-x | PandaBoardPkg/build.sh | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/PandaBoardPkg/build.sh b/PandaBoardPkg/build.sh index 8002eac264..dc4b9067d7 100755 --- a/PandaBoardPkg/build.sh +++ b/PandaBoardPkg/build.sh @@ -85,12 +85,23 @@ then fi TARGET=DEBUG -for arg in "$@" +BUILD_TARGET=DEBUG +args=($@) + +for (( i=0; i<$#; i++ )) do - if [[ $arg == RELEASE ]]; - then - TARGET=RELEASE - fi + if [[ "${args[$i]}" == "-b" ]] + then + TARGET=${args[$i+1]} + BUILD_TARGET=$TARGET + if [[ "$TARGET" == "RELEASE" ]] + then + BUILD_TARGET="$BUILD_TARGET -D DEBUG_TARGET=RELEASE" + fi + i=$i+1 + else + other_args="$other_args ${args[$i]}" + fi done BUILD_ROOT=$WORKSPACE/Build/PandaBoard/"$TARGET"_"$TARGET_TOOLS" @@ -109,12 +120,7 @@ fi # # Build the edk2 PandaBoard code # -if [[ $TARGET == RELEASE ]]; then - build -p $WORKSPACE/PandaBoardPkg/PandaBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET -D DEBUG_TARGET=RELEASE ${2:-} ${3:-} ${4:-} ${5:-} ${6:-} ${7:-} ${8:-} -else - build -p ${WORKSPACE:-}/PandaBoardPkg/PandaBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET ${1:-} ${2:-} ${3:-} ${4:-} ${5:-} ${6:-} ${7:-} ${8:-} -fi - +build -p $WORKSPACE/PandaBoardPkg/PandaBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $BUILD_TARGET $other_args for arg in "$@" do |