]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR.
authorArnout Vandecappelle <arnout@mind.be>
Tue, 4 Feb 2014 15:18:51 +0000 (16:18 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 9 Feb 2014 10:02:42 +0000 (11:02 +0100)
To make the naming consistent (all user-visible options should be
prefixed BR2_).

An entry is added to Makefile.legacy to warn users who have set
BUILDROOT_DL_DIR but not BR2_DL_DIR.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Config.in
Makefile
Makefile.legacy
docs/manual/common-usage.txt
docs/manual/download-location.txt
package/pkg-download.mk

index 67fbcd50663436adaf2ccb709ae132ac370f10a7..bcfefc79f9b51ddc3419749cd922143e3154cf15 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -126,7 +126,7 @@ config BR2_DL_DIR
        default "$(TOPDIR)/dl"
        help
          Directory to store all the source files that we need to fetch.
-         If the Linux shell environment has defined the BUILDROOT_DL_DIR
+         If the Linux shell environment has defined the BR2_DL_DIR
          environment variable, then this overrides this configuration item.
 
          The default is $(TOPDIR)/dl
index d8f1584a6c482ffcd12ca43fe48723ac85f7e6b8..563fbfdba97227ff7edc7adcf8ec90c234236dd6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -121,6 +121,13 @@ else
   $(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE))
 endif
 
+# To make sure the the environment variable overrides the .config option,
+# set this before including .config.
+ifneq ($(BR2_DL_DIR),)
+DL_DIR := $(BR2_DL_DIR)
+endif
+
+
 # Need that early, before we scan packages
 # Avoids doing the $(or...) everytime
 BR2_GRAPH_OUT := $(or $(GRAPH_OUT),pdf)
index e0b7ec29c46ec2f92d7ee049865c216f0111e316..4954398c5a24d3ebc6d0fe82a1c22f2bf068963d 100644 (file)
@@ -12,6 +12,22 @@ ifeq ($(BR2_LEGACY),y)
 $(error "You have legacy configuration in your .config! Please check your configuration.")
 endif
 
+#
+# Legacy options from 2014.02
+#
+
+# The BUILDROOT_DL_DIR environment variable was renamed by BR2_DL_DIR. We
+# want to detect someone using the old variable, _except_ if also the new
+# variable was set. By the time we get here, however, we no longer have
+# access to the BR2_DL_DIR environment variable (because it has been overridden
+# by the .config inclusion). However, the environment variable (if defined) was
+# saved in DL_DIR, so we can use that.
+ifneq ($(BUILDROOT_DL_DIR),)
+ifneq ($(BUILDROOT_DL_DIR),$(DL_DIR))
+$(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
+endif
+endif
+
 #
 # Legacy options from 2012.08
 #
index 1d15c050ecf9765c67a7beca51e4bc6f3d44818b..127060dc35c4c5d568acf64e890b8407a1749885 100644 (file)
@@ -80,7 +80,7 @@ to +make+ or set in the environment:
   configuration interface, so through the Buildroot +.config+ file; this
   is the recommended way of setting it.
   +
-* +BUILDROOT_DL_DIR+ to override the directory in which
+* +BR2_DL_DIR+ to override the directory in which
   Buildroot stores/retrieves downloaded files
   +
   Note that the Buildroot download directory can also be set from the
index 4aa8cead3e8d39ad58cad2908552d949c7ad6196..db004496172df1ccc21283966a474c4d45780287 100644 (file)
@@ -13,14 +13,14 @@ filesystem with exactly the same versions.
 
 If you maintain several Buildroot trees, it might be better to have a
 shared download location. This can be achieved by pointing the
-+BUILDROOT_DL_DIR+ environment variable to a directory.  If this is
++BR2_DL_DIR+ environment variable to a directory.  If this is
 set, then the value of +BR2_DL_DIR+ in the Buildroot configuration is
 overridden. The following line should be added to +<~/.bashrc>+.
 
 -----------------
- $ export BUILDROOT_DL_DIR <shared download location>
+ $ export BR2_DL_DIR <shared download location>
 -----------------
 
 The download location can also be set in the +.config+ file, with the
-+BR2_DL_DIR+ option. This value is overridden by the +BUILDROOT_DL_DIR+
-environment variable.
++BR2_DL_DIR+ option. Unlike most options in the .config file, this value
+is overridden by the +BR2_DL_DIR+ environment variable.
index 2641d4e8b7c2cbfd142662a3a1009daf737d45c0..84598d5257fee87ed194837e96f0ca737fab87d0 100644 (file)
@@ -23,13 +23,8 @@ LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
 # external-deps target.
 DL_MODE=DOWNLOAD
 
-# 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
-
+# DL_DIR may have been set already from the environment
+DL_DIR ?= $(call qstrip,$(BR2_DL_DIR))
 ifeq ($(DL_DIR),)
 DL_DIR := $(TOPDIR)/dl
 endif