aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-03-26 13:44:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-31 17:39:42 +0100
commit07b0dddab901510208fab44bbc2566d3c3baae93 (patch)
tree05a0f9d7cbfac6010cf95b73a6551295b74e1608 /scripts
parent2d26b1a4f83a635f96072589289a389675abb305 (diff)
downloadopenembedded-core-contrib-07b0dddab901510208fab44bbc2566d3c3baae93.tar.gz
scripts/bitbake: try harder to check if pseudo exists
If pseudodone doesn't exist, we can get STAGING_BINDIR_NATIVE by calling bitbake -e and use that as the path to check for pseudo before we give up and try to build it explicitly first. This is useful for people who share TMPDIR between multiple build directories. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bitbake12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index eb9e14fae1..7a59c6f52a 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -53,8 +53,12 @@ if [ "`pwd`" != "$BUILDDIR" ] ; then
fi
buildpseudo="1"
-if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
- PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+if [ $needpseudo = "1" ]; then
+ if [ -e "$BUILDDIR/pseudodone" ]; then
+ PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
+ else
+ PSEUDOBINDIR=`bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
+ fi
if [ -e "$PSEUDOBINDIR/pseudo" ]; then
buildpseudo="0"
fi
@@ -69,6 +73,9 @@ if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
buildpseudo="2"
fi
fi
+ if [ $buildpseudo = "0" -a ! -e "$BUILDDIR/pseudodone" ] ; then
+ echo $PSEUDOBINDIR > $BUILDDIR/pseudodone
+ fi
fi
# If tar is already built, we don't want to do it again...
@@ -130,7 +137,6 @@ BITBAKE=`which bitbake`
export PATH=$OLDPATH
if [ $needpseudo = "1" ]; then
export PSEUDO_BUILD=2
- PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
else
export PSEUDO_BUILD=0