diff options
| -rwxr-xr-x | oe-init-build-env | 6 | ||||
| -rwxr-xr-x | scripts/oe-buildenv-internal | 13 |
2 files changed, 14 insertions, 5 deletions
diff --git a/oe-init-build-env b/oe-init-build-env index 77332a7d63..cc30a3b191 100755 --- a/oe-init-build-env +++ b/oe-init-build-env | |||
| @@ -35,10 +35,10 @@ else | |||
| 35 | fi | 35 | fi |
| 36 | OEROOT=`readlink -f "$OEROOT"` | 36 | OEROOT=`readlink -f "$OEROOT"` |
| 37 | export OEROOT | 37 | export OEROOT |
| 38 | . $OEROOT/scripts/oe-buildenv-internal | 38 | . $OEROOT/scripts/oe-buildenv-internal && \ |
| 39 | $OEROOT/scripts/oe-setup-builddir | 39 | $OEROOT/scripts/oe-setup-builddir && \ |
| 40 | [ -n "$BUILDDIR" ] && cd $BUILDDIR | ||
| 40 | unset OEROOT | 41 | unset OEROOT |
| 41 | unset BBPATH | 42 | unset BBPATH |
| 42 | [ -n "$BUILDDIR" ] && cd $BUILDDIR | ||
| 43 | fi | 43 | fi |
| 44 | 44 | ||
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index c13fc40f8b..117b0c593e 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | # It is assumed OEROOT is already defined when this is called | 21 | # It is assumed OEROOT is already defined when this is called |
| 22 | if [ -z "$OEROOT" ]; then | 22 | if [ -z "$OEROOT" ]; then |
| 23 | echo >&2 "Error: OEROOT is not defined!" | 23 | echo >&2 "Error: OEROOT is not defined!" |
| 24 | return | 24 | return 1 |
| 25 | fi | 25 | fi |
| 26 | 26 | ||
| 27 | if [ "x$BDIR" = "x" ]; then | 27 | if [ "x$BDIR" = "x" ]; then |
| @@ -29,6 +29,15 @@ if [ "x$BDIR" = "x" ]; then | |||
| 29 | BDIR="build" | 29 | BDIR="build" |
| 30 | else | 30 | else |
| 31 | BDIR=`readlink -f "$1"` | 31 | BDIR=`readlink -f "$1"` |
| 32 | if [ -z "$BDIR" ]; then | ||
| 33 | if expr "$1" : '.*/$' >/dev/null; then | ||
| 34 | echo >&2 "Error: please remove any trailing / in the argument." | ||
| 35 | else | ||
| 36 | PARENTDIR=`dirname "$1"` | ||
| 37 | echo >&2 "Error: the directory $PARENTDIR doesn't exist?" | ||
| 38 | fi | ||
| 39 | return 1 | ||
| 40 | fi | ||
| 32 | fi | 41 | fi |
| 33 | fi | 42 | fi |
| 34 | if expr "$BDIR" : '/.*' > /dev/null ; then | 43 | if expr "$BDIR" : '/.*' > /dev/null ; then |
| @@ -45,7 +54,7 @@ BUILDDIR=`readlink -f "$BUILDDIR"` | |||
| 45 | 54 | ||
| 46 | if ! (test -d "$BITBAKEDIR"); then | 55 | if ! (test -d "$BITBAKEDIR"); then |
| 47 | echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location" | 56 | echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location" |
| 48 | return | 57 | return 1 |
| 49 | fi | 58 | fi |
| 50 | 59 | ||
| 51 | PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" | 60 | PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH" |
