Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01 of 20] pkg-generic: introduce helper function to check for a deprecated variable
Date: Tue, 29 Jul 2014 23:12:28 +0200	[thread overview]
Message-ID: <677354152366d6f52f1b.1406668348@localhost> (raw)
In-Reply-To: <patchbomb.1406668347@localhost>

This patch introduces a helper check-deprecated-variable, that throws an
error when a package defines a deprecated variable. This helps in detecting
transition errors when changing the buildroot infrastructures, and also
helps users that have created packages not part of mainline buildroot.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/pkg-generic.mk |  15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff -r 6ff0cfa8a802 -r 677354152366 package/pkg-generic.mk
--- a/package/pkg-generic.mk	Tue May 20 13:53:00 2014 +1200
+++ b/package/pkg-generic.mk	Mon Jul 28 21:39:53 2014 +0200
@@ -264,6 +264,21 @@
 endef
 
 ################################################################################
+# check-deprecated-variable -- throw an error on deprecated variables
+#
+# argument 1 is the deprecated variable
+# argument 2 is the new variable to use
+#
+# example:
+#   $(eval $(call check-deprecated-variable,FOO_MAKE_OPT,FOO_MAKE_OPTS))
+################################################################################
+define check-deprecated-variable
+ifneq ($$(origin $(1)),undefined)
+$$(error Package error: use $(2) instead of $(1). Please fix your .mk file)
+endif
+endef
+
+################################################################################
 # inner-generic-package -- generates the make targets needed to build a
 # generic package
 #

  reply	other threads:[~2014-07-29 21:12 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 21:12 [Buildroot] [PATCH 00 of 20] packages: rename _OPT into _OPTS Thomas De Schampheleire
2014-07-29 21:12 ` Thomas De Schampheleire [this message]
2014-09-14 13:50   ` [Buildroot] [PATCH 01 of 20] pkg-generic: introduce helper function to check for a deprecated variable Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 02 of 20] packages: rename FOO_MAKE_OPT into FOO_MAKE_OPTS Thomas De Schampheleire
2014-09-14 14:08   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 03 of 20] pkg-generic: add check on deprecated variable FOO_MAKE_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 04 of 20] packages: rename FOO_INSTALL_OPT into FOO_INSTALL_OPTS Thomas De Schampheleire
2014-09-14 14:11   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 05 of 20] pkg-generic: add check on deprecated variable FOO_INSTALL_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 06 of 20] packages: rename FOO_INSTALL_TARGET_OPT into FOO_INSTALL_TARGET_OPTS Thomas De Schampheleire
2014-09-14 14:30   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 07 of 20] pkg-generic: add check on deprecated variable FOO_INSTALL_TARGET_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 08 of 20] packages: rename FOO_INSTALL_STAGING_OPT into FOO_INSTALL_STAGING_OPTS Thomas De Schampheleire
2014-09-14 14:34   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 09 of 20] pkg-generic: add check on deprecated variable FOO_INSTALL_STAGING_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 10 of 20] packages: rename FOO_INSTALL_HOST_OPT into FOO_INSTALL_HOST_OPTS Thomas De Schampheleire
2014-09-14 14:38   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 11 of 20] pkg-generic: add check on deprecated variable FOO_INSTALL_HOST_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 12 of 20] packages: rename FOO_AUTORECONF_OPT into FOO_AUTORECONF_OPTS Thomas De Schampheleire
2014-09-14 14:42   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 13 of 20] pkg-generic: add check on deprecated variable FOO_AUTORECONF_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 14 of 20] packages: rename FOO_CONF_OPT into FOO_CONF_OPTS Thomas De Schampheleire
2014-09-14 14:48   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 15 of 20] pkg-generic: add check on deprecated variable FOO_CONF_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 16 of 20] packages: rename FOO_BUILD_OPT into FOO_BUILD_OPTS Thomas De Schampheleire
2014-09-14 14:50   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 17 of 20] pkg-generic: add check on deprecated variable FOO_BUILD_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 18 of 20] packages: rename FOO_GETTEXTIZE_OPT into FOO_GETTEXTIZE_OPTS Thomas De Schampheleire
2014-09-14 14:51   ` Yann E. MORIN
2014-07-29 21:12 ` [Buildroot] [PATCH 19 of 20] pkg-generic: add check on deprecated variable FOO_GETTEXTIZE_OPT Thomas De Schampheleire
2014-07-29 21:12 ` [Buildroot] [PATCH 20 of 20] packages: rename misc. occurrences of _OPT into _OPTS Thomas De Schampheleire
2014-09-14 14:56   ` Yann E. MORIN
2014-07-30  5:15 ` [Buildroot] [PATCH 00 of 20] packages: rename " Thomas De Schampheleire
2014-09-14 14:13 ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=677354152366d6f52f1b.1406668348@localhost \
    --to=patrickdepinguin@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox