diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2008-11-06 14:39:12 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2008-11-06 14:40:30 +0000 |
commit | 9715260c3567510a97b8aaf6408a79e07930f21e (patch) | |
tree | fa2bb9ad4bd2acaacddbe1d328555ee4bf425305 /scripts/poky-env-internal | |
parent | 9e8d22ae3868b6ea6ebdd64be64b1202b90fe593 (diff) | |
download | poky-9715260c3567510a97b8aaf6408a79e07930f21e.tar.gz |
scripts/poky-env-internal: Automatically add in additional meta- repositories if found
Diffstat (limited to 'scripts/poky-env-internal')
-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 |