[OE-core] [PATCH 1/1] bitbake.conf: Added new variable BBINCLUDES
Lianhao Lu
lianhao.lu at intel.com
Fri Feb 24 03:00:40 UTC 2012
The new variable BBINCLUDES contains the file dependency information. It
exposes the bitbake internal variable '__depends' and '__base_depends'.
Signed-off-by: Lianhao Lu <lianhao.lu at intel.com>
---
meta/conf/bitbake.conf | 2 ++
meta/lib/oe/utils.py | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 90e5f7a..04851e5 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -731,3 +731,5 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_
MLPREFIX ??= ""
MULTILIB_VARIANTS ??= ""
+
+BBINCLUDES = "${@oe.utils.get_file_depends(d)}"
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 02d5442..b4dcc4f 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -88,3 +88,12 @@ def param_bool(cfg, field, dflt = None):
def inherits(d, *classes):
"""Return True if the metadata inherits any of the specified classes"""
return any(bb.data.inherits_class(cls, d) for cls in classes)
+
+def get_file_depends(d):
+ '''Return the dependent files'''
+ dep_files = []
+ depends = d.getVar('__depends', True) or set()
+ depends = depends.union(d.getVar('__base_depends', True) or set())
+ for (fn, ctime) in depends:
+ dep_files.append(os.path.abspath(fn))
+ return " ".join(dep_files)
--
1.7.0.4
More information about the Openembedded-core
mailing list