summaryrefslogtreecommitdiff
path: root/scripts/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bitbake')
-rwxr-xr-xscripts/bitbake38
1 files changed, 33 insertions, 5 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index 2c03314e0..f40bd2826 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -1,9 +1,33 @@
#!/bin/sh
+NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment"
+needpseudo="1"
+for opt in $@; do
+for key in $NO_BUILD_OPTS; do
+ if [ $opt = $key ]
+ then
+ needpseudo="0"
+ break
+ fi
+done
+[ $needpseudo = "0" ] && break
+done
+
+buildpseudo="1"
+if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
+ PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+ if [ -e "$PSEUDOBINDIR/pseudo" ]; then
+ buildpseudo="0"
+ fi
+fi
+if [ $needpseudo = "0" ]; then
+ buildpseudo="0"
+fi
+
OLDPATH=$PATH
export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
-if [ ! -e "$BUILDDIR/pseudodone" ]; then
- echo "Pseudo has not been built, building this first before the main build"
- bitbake pseudo-native
+if [ $buildpseudo = "1" ]; then
+ echo "Pseudo is not present but is required, building this first before the main build"
+ bitbake pseudo-native -c populate_sysroot
ret=$?
if [ "$ret" != "0" ]; then
exit 1
@@ -19,7 +43,11 @@ 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 [ $needpseudo = "1" ]; 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