diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-03-26 15:22:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-31 17:59:09 +0100 |
commit | 43d819c8901db30c359694ef83ceb123909cb298 (patch) | |
tree | 82673c7e4e060e4f9a756860212901786ee41a10 /scripts | |
parent | 299f890f6dfdf30dbfea1a11682589c151f18b77 (diff) | |
download | poky-43d819c8901db30c359694ef83ceb123909cb298.tar.gz |
scripts/bitbake: allow switching between build directories
The recent addition of the check to ensure the user was in their build
directory disabled the ability to switch between build directories
without re-running the build environment setup script. We can rely
upon checking for conf/bblayers.conf instead, so use this check.
This does allow BUILDDIR (which is normally set by the environment
script) to be unset; however if it is set then it is assumed to be the
correct build directory and will be used in the error message that is
shown when we can't find conf/bblayers.conf.
(From OE-Core rev: 769384decb095fb3c49eb13b8f7f69c978d0bcba)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bitbake | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 7a59c6f52a..0431d9531a 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -37,6 +37,16 @@ if [ "$py_v26_check" != "True" ]; then | |||
37 | exit 1 | 37 | exit 1 |
38 | fi | 38 | fi |
39 | 39 | ||
40 | if [ ! -e conf/bblayers.conf ] ; then | ||
41 | BDPRINT="" | ||
42 | [ -n "$BUILDDIR" ] && BDPRINT=": $BUILDDIR" | ||
43 | echo "Unable to find conf/bblayers.conf" | ||
44 | echo "BitBake must be run from within your build directory$BDPRINT" | ||
45 | exit 1 | ||
46 | elif [ -z "$BUILDDIR" ] ; then | ||
47 | BUILDDIR="`pwd`" | ||
48 | fi | ||
49 | |||
40 | needtar="1" | 50 | needtar="1" |
41 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` | 51 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` |
42 | float_test() { | 52 | float_test() { |
@@ -47,11 +57,6 @@ float_test() { | |||
47 | # but earlier versions do not | 57 | # but earlier versions do not |
48 | float_test "$TARVERSION > 1.23" && needtar="0" | 58 | float_test "$TARVERSION > 1.23" && needtar="0" |
49 | 59 | ||
50 | if [ "`pwd`" != "$BUILDDIR" ] ; then | ||
51 | echo "BitBake must be run from your build directory: $BUILDDIR" | ||
52 | exit 1 | ||
53 | fi | ||
54 | |||
55 | buildpseudo="1" | 60 | buildpseudo="1" |
56 | if [ $needpseudo = "1" ]; then | 61 | if [ $needpseudo = "1" ]; then |
57 | if [ -e "$BUILDDIR/pseudodone" ]; then | 62 | if [ -e "$BUILDDIR/pseudodone" ]; then |