aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2012-09-10 12:38:29 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2012-09-10 16:00:50 +0200
commita77ee7fd40a78d6fe05657b4f4be63926c04e523 (patch)
tree1ec14259217096e944b77a11b3f17eb4a8b788fd /package
parent48a68499d17a730fdf83934f5e9032eb373c596d (diff)
downloadbuildroot-novena-a77ee7fd40a78d6fe05657b4f4be63926c04e523.tar.gz
buildroot-novena-a77ee7fd40a78d6fe05657b4f4be63926c04e523.zip
pkg-download: allow relative BR2_DL_DIR
And move the BUILDROOT_DL_DIR override here as well for consistency. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/pkg-download.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 9e9858100..fa9a3e883 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -22,11 +22,20 @@ LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
# external-deps target.
DL_MODE=DOWNLOAD
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
+# Override BR2_DL_DIR if shell variable defined
+ifneq ($(BUILDROOT_DL_DIR),)
+DL_DIR:=$(BUILDROOT_DL_DIR)
+else
+DL_DIR:=$(call qstrip,$(BR2_DL_DIR))
+endif
+
ifeq ($(DL_DIR),)
DL_DIR:=$(TOPDIR)/dl
endif
+# ensure it exists and a absolute path
+DL_DIR:=$(shell mkdir -p $(DL_DIR) && cd $(DL_DIR) >/dev/null && pwd)
+
#
# URI scheme helper functions
# Example URIs: