[edk2] [RFC PATCH] accept "-j JOBS" in OvmfPkg build script

Subject: [edk2] [RFC PATCH] accept "-j JOBS" in OvmfPkg build script

From: Laszlo Ersek <lersek@redhat.com>

To: edk2-devel@lists.sourceforge.net

Date: 2012-07-08 19:40:03

"-j" is inspired by GNU Make's corresponding parameter. To stay consistent
with "build", "-n" could be better though.

Also, instead of using JOBS=1 in the default case, passing "-n" to "build"
could be completely avoided, eg. with the ${parameter:+word} (Use
Alternate Value) expansion.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek 
---
 OvmfPkg/build.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index 28c7d38..26c402e 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -45,6 +45,7 @@ PROCESSOR=X64
 BUILDTARGET=DEBUG
 BUILD_OPTIONS=
 PLATFORMFILE=
+JOBS=1
 LAST_ARG=
 RUN_QEMU=no
 
@@ -89,7 +90,7 @@ for arg in "$@"
 do
   if [ -z "$LAST_ARG" ]; then
     case $arg in
-      -a|-b|-t|-p)
+      -a|-b|-t|-p|-j)
         LAST_ARG=$arg
         ;;
       qemu)
@@ -115,6 +116,9 @@ do
       -t)
         TARGET_TOOLS=$arg
         ;;
+      -j)
+        JOBS=$arg
+        ;;
       *)
         BUILD_OPTIONS="$BUILD_OPTIONS $arg"
         ;;
@@ -207,6 +211,6 @@ fi
 # Build the edk2 OvmfPkg
 #
 echo Running edk2 build for OvmfPkg$Processor
-build -p $PLATFORMFILE $BUILD_OPTIONS -a $PROCESSOR -b $BUILDTARGET -t $TARGET_TOOLS
+build -p $PLATFORMFILE $BUILD_OPTIONS -a $PROCESSOR -b $BUILDTARGET -t $TARGET_TOOLS -n $JOBS
 exit $?
 
-- 
1.7.1


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel