Makefile.legacy 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #
  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.
  7. ifeq ($(BR2_LEGACY),y)
  8. $(error "You have legacy configuration in your .config! Please check your configuration.")
  9. endif
  10. #
  11. # Legacy options from 2014.02
  12. #
  13. # The BUILDROOT_DL_DIR environment variable was renamed by BR2_DL_DIR. We
  14. # want to detect someone using the old variable, _except_ if also the new
  15. # variable was set. By the time we get here, however, we no longer have
  16. # access to the BR2_DL_DIR environment variable (because it has been overridden
  17. # by the .config inclusion). However, the environment variable (if defined) was
  18. # saved in DL_DIR, so we can use that.
  19. ifneq ($(BUILDROOT_DL_DIR),)
  20. ifneq ($(BUILDROOT_DL_DIR),$(DL_DIR))
  21. $(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
  22. endif
  23. endif
  24. # If a script is using the deprecated BUILDROOT_CONFIG, make sure it fails.
  25. # Add some directories in front just in case someone used dirname on it.
  26. BUILDROOT_CONFIG_FAKE = /tmp/deprecated/The-BUILDROOT_CONFIG-environment-variable-was-renamed-to-BR2_CONFIG
  27. # Similar to above for BUILDROOT_CONFIG, but here we have no .config equivalent.
  28. ifneq ($(BUILDROOT_CONFIG),)
  29. ifneq ($(BUILDROOT_CONFIG),$(BR2_CONFIG))
  30. ifneq ($(BUILDROOT_CONFIG),$(BUILDROOT_CONFIG_FAKE))
  31. $(error "The BUILDROOT_CONFIG environment variable was renamed to BR2_CONFIG.")
  32. endif
  33. endif
  34. endif
  35. BUILDROOT_CONFIG = $(BUILDROOT_CONFIG_FAKE)
  36. export BUILDROOT_CONFIG
  37. #
  38. # Legacy options from 2012.08
  39. #
  40. host-pkg-config:
  41. @$(call MESSAGE,host-pkg-config is replaced by host-pkgconf)
  42. @$(call MESSAGE,please update your .mk files)
  43. @false
  44. .PHONY: host-pkg-config
  45. #
  46. # Legacy options from 2012.05
  47. #
  48. GENTARGETS = $$(error The GENTARGETS macro no longer exists; use $$$$(eval $$$$(generic-package)) or $$$$(eval $$$$(host-generic-package)))
  49. AUTOTARGETS = $$(error The AUTOTARGETS macro no longer exists; use $$$$(eval $$$$(autotools-package)) or $$$$(eval $$$$(host-autotools-package)))
  50. CMAKETARGETS = $$(error The CMAKETARGETS macro no longer exists; use $$$$(eval $$$$(cmake-package)) or $$$$(eval $$$$(host-cmake-package)))