aglbsp: use shared recipes from this layer
[AGL/meta-agl.git] / meta-agl-bsp / conf / layer.conf
index b0010f7..fdde835 100644 (file)
@@ -1,9 +1,14 @@
 # We have a conf and classes directory, add to BBPATH
 BBPATH =. "${LAYERDIR}:"
 
-# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-            ${LAYERDIR}/recipes-*/*/*.bbappend"
+# Let us add layer-specific bbappends which are only applied when that
+# layer is included in our configuration -
+# e.g. only add layers if a bsp is present.
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
+
+# Add shared recipes among BSPs
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
 
 BBFILE_COLLECTIONS += "aglbsp"
 BBFILE_PATTERN_aglbsp = "^${LAYERDIR}/"