diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-28 11:01:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-28 11:01:11 +0000 |
commit | bce90ed58654adf45d0edbf54a93de2909c543bc (patch) | |
tree | 267194a9d6a50a1ee9fb15ad3688980694122c7c /scripts/bitbake | |
parent | 7261f25a075ba25b90f9207e9cf9e97bc818f3b0 (diff) | |
download | poky-bce90ed58654adf45d0edbf54a93de2909c543bc.tar.gz |
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>
Diffstat (limited to 'scripts/bitbake')
-rwxr-xr-x | scripts/bitbake | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 2576871e87..55bc8fd437 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -1,21 +1,32 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment" | 2 | NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --environment" |
3 | no_build="0" | 3 | needpseudo="1" |
4 | for opt in $@; do | 4 | for opt in $@; do |
5 | for key in $NO_BUILD_OPTS; do | 5 | for key in $NO_BUILD_OPTS; do |
6 | if [ $opt == $key ] | 6 | if [ $opt == $key ] |
7 | then | 7 | then |
8 | no_build="1" | 8 | needpseudo="0" |
9 | break | 9 | break |
10 | fi | 10 | fi |
11 | done | 11 | done |
12 | [ $no_build == "1" ] && break | 12 | [ $needpseudo == "0" ] && break |
13 | done | 13 | done |
14 | 14 | ||
15 | buildpseudo="1" | ||
16 | if [ $needpseudo == "1" -a -e "$BUILDDIR/pseudodone" ]; then | ||
17 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | ||
18 | if [ -e "$PSEUDOBINDIR/pseudo" ]; then | ||
19 | buildpseudo="0" | ||
20 | fi | ||
21 | fi | ||
22 | if [ $needpseudo == "0" ]; then | ||
23 | buildpseudo="0" | ||
24 | fi | ||
25 | |||
15 | OLDPATH=$PATH | 26 | OLDPATH=$PATH |
16 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` | 27 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` |
17 | if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then | 28 | if [ $buildpseudo == "1" ]; then |
18 | echo "Pseudo has not been built, building this first before the main build" | 29 | echo "Pseudo is not present but is required, building this first before the main build" |
19 | bitbake pseudo-native -c populate_sysroot | 30 | bitbake pseudo-native -c populate_sysroot |
20 | ret=$? | 31 | ret=$? |
21 | if [ "$ret" != "0" ]; then | 32 | if [ "$ret" != "0" ]; then |
@@ -32,8 +43,7 @@ if [ ! -e "$BUILDDIR/pseudodone" -a $no_build == "0" ]; then | |||
32 | fi | 43 | fi |
33 | BITBAKE=`which bitbake` | 44 | BITBAKE=`which bitbake` |
34 | export PATH=$OLDPATH | 45 | export PATH=$OLDPATH |
35 | if [ $no_build == "0" ] | 46 | if [ $needpseudo == "1" ]; then |
36 | then | ||
37 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 47 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` |
38 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ | 48 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ |
39 | else | 49 | else |