poky/scripts/bitbake
Lianhao Lu a47c6415bd 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>
2011-01-05 14:24:00 +00:00

1.2 KiB
Executable File

#!/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" -a $no_build == "0" ]; then echo "Pseudo has not been built, building this first before the main build" bitbake pseudo-native ret=$? if [ "$ret" != "0" ]; then exit 1 fi PSEUDOBINDIR=bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2 ret=$? if [ "$ret" != "0" ]; then exit 1 fi echo $PSEUDOBINDIR > $BUILDDIR/pseudodone # This needs to exist in case pseudo has to log somewhere mkdir -p $PSEUDOBINDIR/../../var/pseudo fi BITBAKE=which bitbake export PATH=$OLDPATH 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