poky-env-internal: Allow the environment variable POKYCONF to provide the basis for...
authorGary Thomas <gary@mlbassoc.com>
Wed, 8 Dec 2010 13:11:52 +0000 (06:11 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 9 Dec 2010 14:44:13 +0000 (14:44 +0000)
By using the POKYCONF variable, a meta layer can provide the basic setup for files to
be used during a build.  This is similar to the default values stored in the main meta
tree, .../meta/conf/local.conf.sample, etc

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
scripts/poky-env-internal

index 5b206ed..c8b39c9 100755 (executable)
@@ -58,6 +58,24 @@ if ! (test -d "$BITBAKEDIR" && test -d "$BUILDDIR"); then
     return
 fi
 
+# 
+# $POKYCONF can point to a directory for the template local.conf & bblayers.conf
+#
+if [ "x" != "x$POKYCONF" ]; then
+    if ! (test -d "$POKYCONF"); then
+       # Allow POKYCONF=meta-xyz/conf as a shortcut
+       if [ -d "$OEROOT/$POKYCONF" ]; then
+           POKYCONF="$OEROOT/$POKYCONF"
+       fi
+       if ! (test -d "$POKYCONF"); then
+           echo >&2 "Error: '$POKYCONF' must be a directory containing local.conf & bblayers.conf"
+           return
+       fi
+    fi
+    POKYLAYERCONF="$POKYCONF/bblayers.conf"
+    POKYLOCALCONF="$POKYCONF/local.conf"
+fi
+
 if [ "x" = "x$POKYLOCALCONF" ]; then
     POKYLOCALCONF="$OEROOT/meta/conf/local.conf.sample"
 fi