From 651981b62ab8c2e67f3360141fc6339fc72e9bca Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Wed, 29 Jun 2011 10:54:53 -0500 Subject: add thisdir.bbclass --- multitech/classes/thisdir.bbclass | 3 +++ multitech/conf/layer.conf | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 multitech/classes/thisdir.bbclass 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" -- cgit v1.2.3