diff mbox

[2,of,2] check-deprecated-variable: move call to respective infra where appropriate

Message ID 17b8f7627130f84d5e80.1412495912@localhost
State Rejected
Headers show

Commit Message

Thomas De Schampheleire Oct. 5, 2014, 7:58 a.m. UTC
Move the checks for AUTORECONF_OPT, GETTEXTIZE_OPT to pkg-autotools.mk,
and for KCONFIG_OPT to pkg-kconfig.mk.

The other checks are used by several infras and are therefore better placed
in pkg-generic.mk.

Comments

Yann E. MORIN Oct. 5, 2014, 8:15 a.m. UTC | #1
Thomas, All,

On 2014-10-05 09:58 +0200, Thomas De Schampheleire spake thusly:
> Move the checks for AUTORECONF_OPT, GETTEXTIZE_OPT to pkg-autotools.mk,
> and for KCONFIG_OPT to pkg-kconfig.mk.
> 
> The other checks are used by several infras and are therefore better placed
> in pkg-generic.mk.

Missing SoB line. ;-)

Anyway, as sseen on IRC: we keep all checks in one place, but add a
comment explaining why.

Regards,
Yann E. MORIN.

> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -103,6 +103,10 @@
>   $(2)_AUTORECONF_OPTS ?= $$($(3)_AUTORECONF_OPTS)
>  endif
>  
> +# These options have been renamed from _OPT to _OPTS in 2014.11
> +$(eval $(call check-deprecated-variable,$(2)_GETTEXTIZE_OPT,$(2)_GETTEXTIZE_OPTS))
> +$(eval $(call check-deprecated-variable,$(2)_AUTORECONF_OPT,$(2)_AUTORECONF_OPTS))
> +
>  $(2)_CONF_ENV			?=
>  $(2)_CONF_OPTS			?=
>  $(2)_MAKE_ENV			?=
> @@ -111,7 +115,6 @@
>  $(2)_INSTALL_STAGING_OPTS	?= DESTDIR=$$(STAGING_DIR) install
>  $(2)_INSTALL_TARGET_OPTS		?= DESTDIR=$$(TARGET_DIR)  install
>  
> -
>  #
>  # Configure step. Only define it if not already defined by the package
>  # .mk file. And take care of the differences between host and target
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -708,11 +708,8 @@
>  $(eval $(call check-deprecated-variable,$(2)_INSTALL_TARGET_OPT,$(2)_INSTALL_TARGET_OPTS))
>  $(eval $(call check-deprecated-variable,$(2)_INSTALL_STAGING_OPT,$(2)_INSTALL_STAGING_OPTS))
>  $(eval $(call check-deprecated-variable,$(2)_INSTALL_HOST_OPT,$(2)_INSTALL_HOST_OPTS))
> -$(eval $(call check-deprecated-variable,$(2)_AUTORECONF_OPT,$(2)_AUTORECONF_OPTS))
>  $(eval $(call check-deprecated-variable,$(2)_CONF_OPT,$(2)_CONF_OPTS))
>  $(eval $(call check-deprecated-variable,$(2)_BUILD_OPT,$(2)_BUILD_OPTS))
> -$(eval $(call check-deprecated-variable,$(2)_GETTEXTIZE_OPT,$(2)_GETTEXTIZE_OPTS))
> -$(eval $(call check-deprecated-variable,$(2)_KCONFIG_OPT,$(2)_KCONFIG_OPTS))
>  
>  TARGETS += $(1)
>  
> diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
> --- a/package/pkg-kconfig.mk
> +++ b/package/pkg-kconfig.mk
> @@ -36,6 +36,9 @@
>  $(2)_KCONFIG_OPTS ?=
>  $(2)_KCONFIG_FIXUP_CMDS ?=
>  
> +# This option has been renamed from _OPT to _OPTS in 2014.11
> +$(eval $(call check-deprecated-variable,$(2)_KCONFIG_OPT,$(2)_KCONFIG_OPTS))
> +
>  # FOO_KCONFIG_FILE is required
>  ifndef $(2)_KCONFIG_FILE
>  $$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
Thomas Petazzoni Oct. 5, 2014, 11:39 a.m. UTC | #2
Dear Thomas De Schampheleire,

On Sun, 05 Oct 2014 09:58:32 +0200, Thomas De Schampheleire wrote:
> Move the checks for AUTORECONF_OPT, GETTEXTIZE_OPT to pkg-autotools.mk,
> and for KCONFIG_OPT to pkg-kconfig.mk.
> 
> The other checks are used by several infras and are therefore better placed
> in pkg-generic.mk.

As per the discussion with Yann, I've rejected this patch.

Thomas
diff mbox

Patch

diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -103,6 +103,10 @@ 
  $(2)_AUTORECONF_OPTS ?= $$($(3)_AUTORECONF_OPTS)
 endif
 
+# These options have been renamed from _OPT to _OPTS in 2014.11
+$(eval $(call check-deprecated-variable,$(2)_GETTEXTIZE_OPT,$(2)_GETTEXTIZE_OPTS))
+$(eval $(call check-deprecated-variable,$(2)_AUTORECONF_OPT,$(2)_AUTORECONF_OPTS))
+
 $(2)_CONF_ENV			?=
 $(2)_CONF_OPTS			?=
 $(2)_MAKE_ENV			?=
@@ -111,7 +115,6 @@ 
 $(2)_INSTALL_STAGING_OPTS	?= DESTDIR=$$(STAGING_DIR) install
 $(2)_INSTALL_TARGET_OPTS		?= DESTDIR=$$(TARGET_DIR)  install
 
-
 #
 # Configure step. Only define it if not already defined by the package
 # .mk file. And take care of the differences between host and target
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -708,11 +708,8 @@ 
 $(eval $(call check-deprecated-variable,$(2)_INSTALL_TARGET_OPT,$(2)_INSTALL_TARGET_OPTS))
 $(eval $(call check-deprecated-variable,$(2)_INSTALL_STAGING_OPT,$(2)_INSTALL_STAGING_OPTS))
 $(eval $(call check-deprecated-variable,$(2)_INSTALL_HOST_OPT,$(2)_INSTALL_HOST_OPTS))
-$(eval $(call check-deprecated-variable,$(2)_AUTORECONF_OPT,$(2)_AUTORECONF_OPTS))
 $(eval $(call check-deprecated-variable,$(2)_CONF_OPT,$(2)_CONF_OPTS))
 $(eval $(call check-deprecated-variable,$(2)_BUILD_OPT,$(2)_BUILD_OPTS))
-$(eval $(call check-deprecated-variable,$(2)_GETTEXTIZE_OPT,$(2)_GETTEXTIZE_OPTS))
-$(eval $(call check-deprecated-variable,$(2)_KCONFIG_OPT,$(2)_KCONFIG_OPTS))
 
 TARGETS += $(1)
 
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -36,6 +36,9 @@ 
 $(2)_KCONFIG_OPTS ?=
 $(2)_KCONFIG_FIXUP_CMDS ?=
 
+# This option has been renamed from _OPT to _OPTS in 2014.11
+$(eval $(call check-deprecated-variable,$(2)_KCONFIG_OPT,$(2)_KCONFIG_OPTS))
+
 # FOO_KCONFIG_FILE is required
 ifndef $(2)_KCONFIG_FILE
 $$(error Internal error: no value specified for $(2)_KCONFIG_FILE)