diff options
author | Arnout Vandecappelle <arnout@mind.be> | 2014-02-10 22:48:55 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-02-11 08:14:57 +0100 |
commit | af97c94b70eee6388f1902864ec248e2817323be (patch) | |
tree | 131e877da50690d876fc9b1555b6428bcb7434e3 /package/pkg-download.mk | |
parent | 28f427ddb94b44ccef0af514c49e40727247df21 (diff) | |
download | buildroot-af97c94b70eee6388f1902864ec248e2817323be.tar.gz buildroot-af97c94b70eee6388f1902864ec248e2817323be.zip |
Makefile.legacy: fix recursive invocation with BUILDROOT_DL_DIR and _CONFIG
The legacy support for the old BUILDROOT_DL_DIR and BUILDROOT_CONFIG
breaks down when make is invoked recursively - which is done in a few
cases, e.g. silentoldconfig, external-defs, ... These targets always
give a legacy error.
For BUILDROOT_DL_DIR, this is fixed by making sure that the original
value of BR2_DL_DIR taken from the environment is also exported again.
For BUILDROOT_CONFIG, this is fixed with an additional comparison of
the environment variable's value with the fake value that we introduce
ourselves.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-download.mk')
-rw-r--r-- | package/pkg-download.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 84598d5257..6d4cbcded4 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -24,10 +24,15 @@ LOCALFILES := $(call qstrip,$(BR2_LOCALFILES)) DL_MODE=DOWNLOAD # DL_DIR may have been set already from the environment +ifeq ($(origin DL_DIR),undefined) DL_DIR ?= $(call qstrip,$(BR2_DL_DIR)) ifeq ($(DL_DIR),) DL_DIR := $(TOPDIR)/dl endif +else +# Restore the BR2_DL_DIR that was overridden by the .config file +BR2_DL_DIR = $(DL_DIR) +endif # ensure it exists and a absolute path DL_DIR := $(shell mkdir -p $(DL_DIR) && cd $(DL_DIR) >/dev/null && pwd) |