mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d7a6a01ed7
commit
a47c6415bd
+21
-3
@@ -1,7 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/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
|
OLDPATH=$PATH
|
||||||
export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
|
export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
|
||||||
if [ ! -e "$BUILDDIR/pseudodone" ]; then
|
if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then
|
||||||
echo "Pseudo has not been built, building this first before the main build"
|
echo "Pseudo has not been built, building this first before the main build"
|
||||||
bitbake pseudo-native
|
bitbake pseudo-native
|
||||||
ret=$?
|
ret=$?
|
||||||
@@ -19,7 +32,12 @@ if [ ! -e "$BUILDDIR/pseudodone" ]; then
|
|||||||
fi
|
fi
|
||||||
BITBAKE=`which bitbake`
|
BITBAKE=`which bitbake`
|
||||||
export PATH=$OLDPATH
|
export PATH=$OLDPATH
|
||||||
PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
|
if [ $no_build == "0" ]
|
||||||
PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
|
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=$?
|
ret=$?
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|||||||
Reference in New Issue
Block a user