blob: 800c08926ca99bfaa569b06a7a10d52349dc2186 [file] [log] [blame]
Arnout Vandecappelle (Essensium/Mind)ebcfa982012-11-12 10:08:28 +00001#
2# Makefile.legacy - support for backward compatibility
3#
4# This file contains placeholders to detect backward-compatibility problems.
5# When a buildroot "API" feature is being deprecated, a rule should be added
6# here that issues an error when the old feature is used.
Arnout Vandecappelle (Essensium/Mind)ebcfa982012-11-12 10:08:28 +00007
8ifeq ($(BR2_LEGACY),y)
9$(error "You have legacy configuration in your .config! Please check your configuration.")
10endif
Arnout Vandecappelle (Essensium/Mind)cc1cd3b2012-11-12 10:08:29 +000011
12#
Arnout Vandecappelle67680212014-02-04 16:18:51 +010013# Legacy options from 2014.02
14#
15
16# The BUILDROOT_DL_DIR environment variable was renamed by BR2_DL_DIR. We
17# want to detect someone using the old variable, _except_ if also the new
18# variable was set. By the time we get here, however, we no longer have
19# access to the BR2_DL_DIR environment variable (because it has been overridden
20# by the .config inclusion). However, the environment variable (if defined) was
21# saved in DL_DIR, so we can use that.
22ifneq ($(BUILDROOT_DL_DIR),)
23ifneq ($(BUILDROOT_DL_DIR),$(DL_DIR))
24$(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
25endif
26endif
27
Arnout Vandecappelleaf97c942014-02-10 22:48:55 +010028# If a script is using the deprecated BUILDROOT_CONFIG, make sure it fails.
29# Add some directories in front just in case someone used dirname on it.
30BUILDROOT_CONFIG_FAKE = /tmp/deprecated/The-BUILDROOT_CONFIG-environment-variable-was-renamed-to-BR2_CONFIG
31
Arnout Vandecappelle4113b3c2014-02-04 16:18:52 +010032# Similar to above for BUILDROOT_CONFIG, but here we have no .config equivalent.
33ifneq ($(BUILDROOT_CONFIG),)
34ifneq ($(BUILDROOT_CONFIG),$(BR2_CONFIG))
Arnout Vandecappelleaf97c942014-02-10 22:48:55 +010035ifneq ($(BUILDROOT_CONFIG),$(BUILDROOT_CONFIG_FAKE))
Arnout Vandecappelle4113b3c2014-02-04 16:18:52 +010036$(error "The BUILDROOT_CONFIG environment variable was renamed to BR2_CONFIG.")
37endif
38endif
Arnout Vandecappelleaf97c942014-02-10 22:48:55 +010039endif
Arnout Vandecappelle4113b3c2014-02-04 16:18:52 +010040
Arnout Vandecappelleaf97c942014-02-10 22:48:55 +010041BUILDROOT_CONFIG = $(BUILDROOT_CONFIG_FAKE)
Arnout Vandecappelle4113b3c2014-02-04 16:18:52 +010042export BUILDROOT_CONFIG
43
Arnout Vandecappelle67680212014-02-04 16:18:51 +010044#
Arnout Vandecappelle (Essensium/Mind)be2460c2012-11-12 10:08:30 +000045# Legacy options from 2012.08
46#
47
48host-pkg-config:
49 @$(call MESSAGE,host-pkg-config is replaced by host-pkgconf)
50 @$(call MESSAGE,please update your .mk files)
51 @false
52.PHONY: host-pkg-config
53
54#
Arnout Vandecappelle (Essensium/Mind)cc1cd3b2012-11-12 10:08:29 +000055# Legacy options from 2012.05
56#
57GENTARGETS = $$(error The GENTARGETS macro no longer exists; use $$$$(eval $$$$(generic-package)) or $$$$(eval $$$$(host-generic-package)))
58AUTOTARGETS = $$(error The AUTOTARGETS macro no longer exists; use $$$$(eval $$$$(autotools-package)) or $$$$(eval $$$$(host-autotools-package)))
59CMAKETARGETS = $$(error The CMAKETARGETS macro no longer exists; use $$$$(eval $$$$(cmake-package)) or $$$$(eval $$$$(host-cmake-package)))