diff options
-rwxr-xr-x | scripts/poky-env-internal | 64 |
1 files changed, 45 insertions, 19 deletions
diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal index 81b1425489..8655bb1f24 100755 --- a/scripts/poky-env-internal +++ b/scripts/poky-env-internal | |||
@@ -30,14 +30,47 @@ if [ "x$BDIR" = "x" ]; then | |||
30 | BDIR="$1" | 30 | BDIR="$1" |
31 | fi | 31 | fi |
32 | fi | 32 | fi |
33 | |||
34 | BBDIR="$OEROOT/bitbake$BBEXTRA/" | ||
35 | PKGDIR="$OEROOT/meta/" | ||
36 | PKGDIR_MOBLIN="$OEROOT/meta-moblin/" | ||
37 | BUILDDIR="$OEROOT/$BDIR/" | 33 | BUILDDIR="$OEROOT/$BDIR/" |
38 | MSG='' | ||
39 | |||
40 | unset BDIR | 34 | unset BDIR |
35 | BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/" | ||
36 | PKGDIR="$OEROOT/meta/" | ||
37 | BBPATH="$BITBAKEDIR $PKGDIR" | ||
38 | |||
39 | # | ||
40 | # Add in any extra meta-* repositories to BBPATH | ||
41 | # | ||
42 | METAREPOS=`cd $OEROOT; find . -maxdepth 1 -name 'meta-*' -type d| sed -e 's#./##g'` | ||
43 | for repo in $METAREPOS | ||
44 | do | ||
45 | # meta-openmoko is disabled by default - see local.conf.sample to enable it | ||
46 | if [ $repo = "meta-openmoko" ]; then | ||
47 | continue | ||
48 | fi | ||
49 | # meta-extras is disabled by default - see local.conf.sample to enable it | ||
50 | if [ $repo = "meta-extras" ]; then | ||
51 | continue | ||
52 | fi | ||
53 | if [ -e $OEROOT/$repo/poky-extra-environment ]; then | ||
54 | . $OEROOT/$repo/poky-extra-environment | ||
55 | fi | ||
56 | BBPATH=" $BBPATH $OEROOT/$repo" | ||
57 | done | ||
58 | |||
59 | BBPATH="$BBPATH $HOME/.oe $HOME/.poky $BUILDDIR" | ||
60 | |||
61 | # | ||
62 | # Remove any symlinks from BBPATH | ||
63 | # | ||
64 | NEWPATH="" | ||
65 | for p in $BBPATH | ||
66 | do | ||
67 | p2=`readlink -f "$p"` | ||
68 | NEWPATH="$p2:$NEWPATH" | ||
69 | done | ||
70 | BBPATH="$NEWPATH" | ||
71 | |||
72 | |||
73 | MSG='' | ||
41 | 74 | ||
42 | BUILD_ARCH=`uname -m` | 75 | BUILD_ARCH=`uname -m` |
43 | BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` | 76 | BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` |
@@ -52,26 +85,19 @@ BBDIR=`readlink -f "$BBDIR"` | |||
52 | PKGDIR=`readlink -f "$PKGDIR"` | 85 | PKGDIR=`readlink -f "$PKGDIR"` |
53 | BUILDDIR=`readlink -f "$BUILDDIR"` | 86 | BUILDDIR=`readlink -f "$BUILDDIR"` |
54 | 87 | ||
55 | if ! (test -d "$BBDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then | 88 | if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then |
56 | echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?" | 89 | echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?" |
57 | return | 90 | return |
58 | fi | 91 | fi |
59 | 92 | ||
60 | if ! (test -r "$BUILDDIR/conf/local.conf"); then | 93 | if [ "x" = "x$POKYLOCALCONF" ]; then |
61 | cp -f $BUILDDIR/conf/local.conf.sample $BUILDDIR/conf/local.conf | 94 | POKYLOCALCONF="$BUILDDIR/conf/local.conf.sample" |
62 | fi | 95 | fi |
63 | 96 | ||
64 | BBPATH=$BBDIR | 97 | if ! (test -r "$BUILDDIR/conf/local.conf"); then |
65 | if test x"$BBDIR" != x"$PKGDIR_MOBLIN"; then | 98 | cp -f $POKYLOCALCONF $BUILDDIR/conf/local.conf |
66 | BBPATH=$PKGDIR_MOBLIN:$BBPATH | ||
67 | fi | ||
68 | if test x"$BBDIR" != x"$PKGDIR"; then | ||
69 | BBPATH=$PKGDIR:$BBPATH | ||
70 | fi | ||
71 | BBPATH="`readlink -f $HOME/.oe`:`readlink -f $HOME/.poky`:$BBPATH" | ||
72 | if test x"$PKGDIR" != x"$BUILDDIR"; then | ||
73 | BBPATH=$BUILDDIR:$BBPATH | ||
74 | fi | 99 | fi |
100 | |||
75 | export BBPATH OEROOT BUILD_SYS BUILDDIR | 101 | export BBPATH OEROOT BUILD_SYS BUILDDIR |
76 | 102 | ||
77 | # Kill off the TERMINFO variable, as glibc will grab its contents in its 'make | 103 | # Kill off the TERMINFO variable, as glibc will grab its contents in its 'make |