diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-11 16:29:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-16 14:08:28 +0100 |
commit | 558807cc30922dbcabe732662ab7f5230a7b3843 (patch) | |
tree | 1b3ff921b838c766bd23e1218130f9401f58d51b | |
parent | 3dea90e8b7bfe988bc4bb70f0f0c50b4f74416bf (diff) | |
download | poky-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.bbclass | 21 | ||||
-rw-r--r-- | meta/classes/gettext.bbclass | 2 |
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 | ||
63 | def base_dep_prepend(d): | 63 | def 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 = "" | 68 | BASE_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 | ||
79 | BASEDEPENDS = "${@base_dep_prepend(d)}" | 70 | BASEDEPENDS = "" |
71 | BASEDEPENDS_class-target = "${@base_dep_prepend(d)}" | ||
72 | BASEDEPENDS_class-nativesdk = "${@base_dep_prepend(d)}" | ||
80 | 73 | ||
81 | DEPENDS_prepend="${BASEDEPENDS} " | 74 | DEPENDS_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 | ||
16 | DEPENDS_GETTEXT ??= "virtual/gettext gettext-native" | 16 | DEPENDS_GETTEXT ??= "virtual/gettext gettext-native" |
17 | 17 | ||
18 | BASEDEPENDS =+ "${@gettext_dependencies(d)}" | 18 | BASEDEPENDS_append = " ${@gettext_dependencies(d)}" |
19 | EXTRA_OECONF_append = " ${@gettext_oeconf(d)}" | 19 | EXTRA_OECONF_append = " ${@gettext_oeconf(d)}" |