check-deprecated-variable: move from pkg-generic.mk to pkg-utils.mk
PATCH 1/1 check-deprecated-variable: move from pkg-generic.mk to pkg-utils.mk
--- package/pkg-generic.mk | 15 --------------- package/pkg-utils.mk | 9 +++++++++ 2 files changed, 9 insertions(+), 15 deletions(-)
package/pkg-generic.mk +0 -15
@@ -264,21 +264,6 @@ 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 #
package/pkg-utils.mk +9 -0
@@ -88,6 +88,15 @@ 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 #
PATCH 1/1 check-deprecated-variable: move call to respective infra where appropriate
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.
package/pkg-autotools.mk +4 -1
@@ -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
package/pkg-generic.mk +0 -3
@@ -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)
package/pkg-kconfig.mk +3 -0
@@ -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)
PATCH 1/1 check-deprecated-variable: move call to respective infra where appropriate
Thomas, All,
On 2014-10-05 09:58 +0200, Thomas De Schampheleire spake thusly:
Quoted 5 lines
Move the checks for
AUTORECONF_OPT,GETTEXTIZE_OPTto pkg-autotools.mk, and forKCONFIG_OPTto 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.
Quoted 50 lines
package/pkg-autotools.mk +4
-1@@ -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 targetpackage/pkg-generic.mk +0
-3@@ -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)package/pkg-kconfig.mk +3
-0@@ -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)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 check-deprecated-variable: move call to respective infra where appropriate
In reply to Thomas De SchampheleireDear Thomas De Schampheleire,
Quoted 5 lines · Thomas De Schampheleire
Move the checks for
AUTORECONF_OPT,GETTEXTIZE_OPTto pkg-autotools.mk, and forKCONFIG_OPTto 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 check-deprecated-variable: move from pkg-generic.mk to pkg-utils.mk
In reply to Thomas De SchampheleireThomas, All,
On 2014-10-05 09:58 +0200, Thomas De Schampheleire spake thusly:
Quoted 2 lines
Suggested-by Thomas Petazzoni <[email protected]>Signed-off-by Thomas De Schampheleire <[email protected]>
Regards,
Yann E. MORIN.
Quoted 49 lines
--- package/pkg-generic.mk | 15 --------------- package/pkg-utils.mk | 9 +++++++++ 2 files changed, 9 insertions(+), 15 deletions(-)package/pkg-generic.mk +0
-15@@ -264,21 +264,6 @@ 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 #package/pkg-utils.mk +9
-0@@ -88,6 +88,15 @@ 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 #
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH 1/1 check-deprecated-variable: move from pkg-generic.mk to pkg-utils.mk
In reply to Thomas De SchampheleireDear Thomas De Schampheleire,
Quoted 7 lines · Thomas De Schampheleire
Suggested-by Thomas Petazzoni <[email protected]>Signed-off-by Thomas De Schampheleire <[email protected]>--- package/pkg-generic.mk | 15 --------------- package/pkg-utils.mk | 9 +++++++++ 2 files changed, 9 insertions(+), 15 deletions(-)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com