]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blobdiff - Makefile.legacy
docs/manual: using a branch name as FOO_VERSION does not work
[coffee/buildroot.git] / Makefile.legacy
index 4954398c5a24d3ebc6d0fe82a1c22f2bf068963d..800c08926ca99bfaa569b06a7a10d52349dc2186 100644 (file)
@@ -4,9 +4,6 @@
 # This file contains placeholders to detect backward-compatibility problems.
 # When a buildroot "API" feature is being deprecated, a rule should be added
 # here that issues an error when the old feature is used.
-#
-# This file is not included if BR2_DEPRECATED is selected, so it is possible
-# to bypass the errors (although that's usually a bad idea).
 
 ifeq ($(BR2_LEGACY),y)
 $(error "You have legacy configuration in your .config! Please check your configuration.")
@@ -28,6 +25,22 @@ $(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
 endif
 endif
 
+# If a script is using the deprecated BUILDROOT_CONFIG, make sure it fails.
+# Add some directories in front just in case someone used dirname on it.
+BUILDROOT_CONFIG_FAKE = /tmp/deprecated/The-BUILDROOT_CONFIG-environment-variable-was-renamed-to-BR2_CONFIG
+
+# Similar to above for BUILDROOT_CONFIG, but here we have no .config equivalent.
+ifneq ($(BUILDROOT_CONFIG),)
+ifneq ($(BUILDROOT_CONFIG),$(BR2_CONFIG))
+ifneq ($(BUILDROOT_CONFIG),$(BUILDROOT_CONFIG_FAKE))
+$(error "The BUILDROOT_CONFIG environment variable was renamed to BR2_CONFIG.")
+endif
+endif
+endif
+
+BUILDROOT_CONFIG = $(BUILDROOT_CONFIG_FAKE)
+export BUILDROOT_CONFIG
+
 #
 # Legacy options from 2012.08
 #