aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2011-01-05 18:13:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-05 14:24:00 +0000
commita47c6415bdff42ebc8ddcae1acafa791f5029ef1 (patch)
tree377b1b7bbfd4b503015cef81af66d12482492002 /scripts
parentd7a6a01ed71805a2199439a931c1be9530707b9a (diff)
downloadopenembedded-core-contrib-a47c6415bdff42ebc8ddcae1acafa791f5029ef1.tar.gz
scripts/bitbake: Skip building pseudo if necessary.
Fixed [BUGID# 625]. Skip building pseudo if necessary by parsing the options to bitbake. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bitbake24
1 files changed, 21 insertions, 3 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index 2c03314e0b..df4e215fc5 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -1,7 +1,20 @@
#!/bin/sh
+NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment"
+no_build="0"
+for opt in $@; do
+for key in $NO_BUILD_OPTS; do
+ if [ $opt == $key ]
+ then
+ no_build="1"
+ break
+ fi
+done
+[ $no_build == "1" ] && break
+done
+
OLDPATH=$PATH
export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
-if [ ! -e "$BUILDDIR/pseudodone" ]; then
+if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then
echo "Pseudo has not been built, building this first before the main build"
bitbake pseudo-native
ret=$?
@@ -19,7 +32,12 @@ if [ ! -e "$BUILDDIR/pseudodone" ]; then
fi
BITBAKE=`which bitbake`
export PATH=$OLDPATH
-PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
-PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
+if [ $no_build == "0" ]
+then
+ PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+ PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
+else
+ $BITBAKE $@
+fi
ret=$?
exit $ret