Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01 of 20] pkg-generic: introduce helper function to check for a deprecated variable
Date: Sun, 14 Sep 2014 15:50:48 +0200	[thread overview]
Message-ID: <20140914135048.GC3917@free.fr> (raw)
In-Reply-To: <677354152366d6f52f1b.1406668348@localhost>

Thomas, All,

On 2014-07-29 23:12 +0200, Thomas De Schampheleire spake thusly:
> 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>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  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
>  #

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2014-09-14 13:50 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 ` [Buildroot] [PATCH 01 of 20] pkg-generic: introduce helper function to check for a deprecated variable Thomas De Schampheleire
2014-09-14 13:50   ` Yann E. MORIN [this message]
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=20140914135048.GC3917@free.fr \
    --to=yann.morin.1998@free.fr \
    --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