diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2011-01-05 18:13:53 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-05 14:24:00 +0000 |
commit | a47c6415bdff42ebc8ddcae1acafa791f5029ef1 (patch) | |
tree | 377b1b7bbfd4b503015cef81af66d12482492002 | |
parent | d7a6a01ed71805a2199439a931c1be9530707b9a (diff) | |
download | poky-a47c6415bdff42ebc8ddcae1acafa791f5029ef1.tar.gz |
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>
-rwxr-xr-x | scripts/bitbake | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 2c03314e0b..df4e215fc5 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -1,7 +1,20 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment" | ||
3 | no_build="0" | ||
4 | for opt in $@; do | ||
5 | for key in $NO_BUILD_OPTS; do | ||
6 | if [ $opt == $key ] | ||
7 | then | ||
8 | no_build="1" | ||
9 | break | ||
10 | fi | ||
11 | done | ||
12 | [ $no_build == "1" ] && break | ||
13 | done | ||
14 | |||
2 | OLDPATH=$PATH | 15 | OLDPATH=$PATH |
3 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` | 16 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` |
4 | if [ ! -e "$BUILDDIR/pseudodone" ]; then | 17 | if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then |
5 | echo "Pseudo has not been built, building this first before the main build" | 18 | echo "Pseudo has not been built, building this first before the main build" |
6 | bitbake pseudo-native | 19 | bitbake pseudo-native |
7 | ret=$? | 20 | ret=$? |
@@ -19,7 +32,12 @@ if [ ! -e "$BUILDDIR/pseudodone" ]; then | |||
19 | fi | 32 | fi |
20 | BITBAKE=`which bitbake` | 33 | BITBAKE=`which bitbake` |
21 | export PATH=$OLDPATH | 34 | export PATH=$OLDPATH |
22 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 35 | if [ $no_build == "0" ] |
23 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ | 36 | then |
37 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | ||
38 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ | ||
39 | else | ||
40 | $BITBAKE $@ | ||
41 | fi | ||
24 | ret=$? | 42 | ret=$? |
25 | exit $ret | 43 | exit $ret |