summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-03-26 15:22:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-31 17:39:55 +0100
commit769384decb095fb3c49eb13b8f7f69c978d0bcba (patch)
tree3712c6f5860b7148c3dcaabe7674189e78c2b5bf /scripts
parent07b0dddab901510208fab44bbc2566d3c3baae93 (diff)
downloadopenembedded-core-769384decb095fb3c49eb13b8f7f69c978d0bcba.tar.gz
openembedded-core-769384decb095fb3c49eb13b8f7f69c978d0bcba.tar.bz2
openembedded-core-769384decb095fb3c49eb13b8f7f69c978d0bcba.zip
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bitbake15
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
exit 1
fi
+if [ ! -e conf/bblayers.conf ] ; then
+ BDPRINT=""
+ [ -n "$BUILDDIR" ] && BDPRINT=": $BUILDDIR"
+ echo "Unable to find conf/bblayers.conf"
+ echo "BitBake must be run from within your build directory$BDPRINT"
+ exit 1
+elif [ -z "$BUILDDIR" ] ; then
+ BUILDDIR="`pwd`"
+fi
+
needtar="1"
TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4`
float_test() {
@@ -47,11 +57,6 @@ float_test() {
# but earlier versions do not
float_test "$TARVERSION > 1.23" && needtar="0"
-if [ "`pwd`" != "$BUILDDIR" ] ; then
- echo "BitBake must be run from your build directory: $BUILDDIR"
- exit 1
-fi
-
buildpseudo="1"
if [ $needpseudo = "1" ]; then
if [ -e "$BUILDDIR/pseudodone" ]; then