summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-11 16:29:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-16 14:08:28 +0100
commit558807cc30922dbcabe732662ab7f5230a7b3843 (patch)
tree1b3ff921b838c766bd23e1218130f9401f58d51b
parent3dea90e8b7bfe988bc4bb70f0f0c50b4f74416bf (diff)
downloadpoky-558807cc30922dbcabe732662ab7f5230a7b3843.tar.gz
base: Simplify BASEDEPENDS construction
This code dates from distant times before we had class overrides. The comments are also rather stale. Rewrite this code using class overrides which makes it safer, more modern and more easily understandable. (From OE-Core rev: fb3b160a6bf20a601d6cecf3f06a2b71c03fa91f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass21
-rw-r--r--meta/classes/gettext.bbclass2
2 files changed, 8 insertions, 15 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index d95afb7b9b..78926656d7 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -61,22 +61,15 @@ oe_runmake() {
61 61
62 62
63def base_dep_prepend(d): 63def base_dep_prepend(d):
64 # 64 if d.getVar('INHIBIT_DEFAULT_DEPS', False):
65 # Ideally this will check a flag so we will operate properly in 65 return ""
66 # the case where host == build == target, for now we don't work in 66 return "${BASE_DEFAULT_DEPS}"
67 # that case though.
68 #
69 67
70 deps = "" 68BASE_DEFAULT_DEPS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
71 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
72 # we need that built is the responsibility of the patch function / class, not
73 # the application.
74 if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
75 if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')):
76 deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
77 return deps
78 69
79BASEDEPENDS = "${@base_dep_prepend(d)}" 70BASEDEPENDS = ""
71BASEDEPENDS_class-target = "${@base_dep_prepend(d)}"
72BASEDEPENDS_class-nativesdk = "${@base_dep_prepend(d)}"
80 73
81DEPENDS_prepend="${BASEDEPENDS} " 74DEPENDS_prepend="${BASEDEPENDS} "
82 75
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index 0be14246bf..d60a0c12ce 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -15,5 +15,5 @@ def gettext_oeconf(d):
15 15
16DEPENDS_GETTEXT ??= "virtual/gettext gettext-native" 16DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
17 17
18BASEDEPENDS =+ "${@gettext_dependencies(d)}" 18BASEDEPENDS_append = " ${@gettext_dependencies(d)}"
19EXTRA_OECONF_append = " ${@gettext_oeconf(d)}" 19EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"