summaryrefslogtreecommitdiff
path: root/scripts/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-28 11:01:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-28 11:01:11 +0000
commitbce90ed58654adf45d0edbf54a93de2909c543bc (patch)
tree267194a9d6a50a1ee9fb15ad3688980694122c7c /scripts/bitbake
parent7261f25a075ba25b90f9207e9cf9e97bc818f3b0 (diff)
downloadopenembedded-core-bce90ed58654adf45d0edbf54a93de2909c543bc.tar.gz
openembedded-core-bce90ed58654adf45d0edbf54a93de2909c543bc.tar.bz2
openembedded-core-bce90ed58654adf45d0edbf54a93de2909c543bc.tar.xz
openembedded-core-bce90ed58654adf45d0edbf54a93de2909c543bc.zip
scripts/bitbake: If pseudo isn't in staging for some reason, force a build of it directly
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/bitbake')
-rwxr-xr-xscripts/bitbake24
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index 2576871e8..55bc8fd43 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -1,21 +1,32 @@
#!/bin/sh
NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment"
-no_build="0"
+needpseudo="1"
for opt in $@; do
for key in $NO_BUILD_OPTS; do
if [ $opt == $key ]
then
- no_build="1"
+ needpseudo="0"
break
fi
done
-[ $no_build == "1" ] && break
+[ $needpseudo == "0" ] && break
done
+buildpseudo="1"
+if [ $needpseudo == "1" -a -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" -a $no_build == "0" ]; then
- echo "Pseudo has not been built, building this first before the main build"
+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
@@ -32,8 +43,7 @@ if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then
fi
BITBAKE=`which bitbake`
export PATH=$OLDPATH
-if [ $no_build == "0" ]
-then
+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