aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-utils.mk
diff options
context:
space:
mode:
authorGravatar Thomas De Schampheleire <patrickdepinguin@gmail.com>2014-10-05 09:58:31 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-10-05 13:38:06 +0200
commit2dc51b7c4da119de9a5dd4d7fea1fc9053eb7925 (patch)
treec66f558e23b618d24fe469bcd8b9b11e62f1c5f8 /package/pkg-utils.mk
parent6a25cec33d0680ba64b6d961da96bfe4b91f0bae (diff)
downloadbuildroot-2dc51b7c4da119de9a5dd4d7fea1fc9053eb7925.tar.gz
buildroot-2dc51b7c4da119de9a5dd4d7fea1fc9053eb7925.tar.bz2
check-deprecated-variable: move from pkg-generic.mk to pkg-utils.mk
Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-utils.mk')
-rw-r--r--package/pkg-utils.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 44766a062e..902531df4a 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -88,6 +88,15 @@ define sep
endef
+# check-deprecated-variable -- throw an error on deprecated variables
+# example:
+# $(eval $(call check-deprecated-variable,FOO_MAKE_OPT,FOO_MAKE_OPTS))
+define check-deprecated-variable # (deprecated var, new var)
+ifneq ($$(origin $(1)),undefined)
+$$(error Package error: use $(2) instead of $(1). Please fix your .mk file)
+endif
+endef
+
#
# legal-info helper functions
#