summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2011-06-29 10:54:53 -0500
committerJesse Gilles <jgilles@multitech.com>2011-06-29 10:54:53 -0500
commit651981b62ab8c2e67f3360141fc6339fc72e9bca (patch)
tree30f2bcd74a6bb832b080ddb8ce118a0d3a561e06
parent5b85e4aa24ad0b836fa44d86e3187d62e528ee66 (diff)
add thisdir.bbclass
-rw-r--r--multitech/classes/thisdir.bbclass3
-rw-r--r--multitech/conf/layer.conf3
2 files changed, 6 insertions, 0 deletions
diff --git a/multitech/classes/thisdir.bbclass b/multitech/classes/thisdir.bbclass
new file mode 100644
index 0000000..f3b07f5
--- /dev/null
+++ b/multitech/classes/thisdir.bbclass
@@ -0,0 +1,3 @@
+# THISDIR only works properly with imediate expansion as it has to run
+# in the context of the location its used (:=)
+THISDIR = "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
diff --git a/multitech/conf/layer.conf b/multitech/conf/layer.conf
index 86f136d..e1769b4 100644
--- a/multitech/conf/layer.conf
+++ b/multitech/conf/layer.conf
@@ -3,3 +3,6 @@ BBPATH .= ":${LAYERDIR}"
BBFILE_COLLECTIONS += "multitech"
BBFILE_PRIORITY_multitech = "5"
BBFILE_PATTERN_multitech = "${LAYERDIR}"
+
+# enable use of THISDIR variable bbappend files (pulled from oe-core)
+INHERIT += "thisdir"