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>
This commit is contained in:
Richard Purdie 2011-01-28 11:01:11 +00:00
parent 7261f25a07
commit bce90ed586
1 changed files with 17 additions and 7 deletions

View File

@ -1,21 +1,32 @@
#!/bin/sh #!/bin/sh
NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment" NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment"
no_build="0" needpseudo="1"
for opt in $@; do for opt in $@; do
for key in $NO_BUILD_OPTS; do for key in $NO_BUILD_OPTS; do
if [ $opt == $key ] if [ $opt == $key ]
then then
no_build="1" needpseudo="0"
break break
fi fi
done done
[ $no_build == "1" ] && break [ $needpseudo == "0" ] && break
done 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 OLDPATH=$PATH
export PATH=`echo $PATH | sed s#[^:]*/scripts:##` export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then if [ $buildpseudo == "1" ]; then
echo "Pseudo has not been built, building this first before the main build" echo "Pseudo is not present but is required, building this first before the main build"
bitbake pseudo-native -c populate_sysroot bitbake pseudo-native -c populate_sysroot
ret=$? ret=$?
if [ "$ret" != "0" ]; then if [ "$ret" != "0" ]; then
@ -32,8 +43,7 @@ if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then
fi fi
BITBAKE=`which bitbake` BITBAKE=`which bitbake`
export PATH=$OLDPATH export PATH=$OLDPATH
if [ $no_build == "0" ] if [ $needpseudo == "1" ]; then
then
PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
else else