aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2015-07-19 15:15:28 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-20 15:30:48 +0200
commit3de81a46dc0087436c6785d60ba5d25fe4fe3b17 (patch)
tree5c50288ad51a09633748873dea66eafccfbcfb30 /package
parent92f96564d3a5b5c4cd4e20faafb4fdc84df2707d (diff)
downloadbuildroot-3de81a46dc0087436c6785d60ba5d25fe4fe3b17.tar.gz
buildroot-3de81a46dc0087436c6785d60ba5d25fe4fe3b17.tar.bz2
core/pkg-generic: host variants inherits target's override-srcdir
When a package has both a target and a host variants, and there is an override-srcdir set for the target variant, the host variant should inherit the target's override-srcdir, unless explicitly set, like we do for all other target-variant properties. However, do not override it if expressly set to empty (i.e. when the user wants to override only the target variant). Also, as we do for the other variables, the target variant never inherits from the host variant. Reported-by: Mike <mikez@OpenPlayer.org> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Tested-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r--package/pkg-generic.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 75dc8b7e69..6a7d97efdf 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -340,6 +340,10 @@ else
endif
$(2)_VERSION := $$(call sanitize,$$($(2)_DL_VERSION))
+ifdef $(3)_OVERRIDE_SRCDIR
+ $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
+endif
+
$(2)_BASE_NAME = $(1)-$$($(2)_VERSION)
$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME)
$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)