packages: improve dependency check in virtual packages.
authoreric.le.bihan.dev@free.fr <eric.le.bihan.dev@free.fr>
Tue, 25 Feb 2014 15:45:36 +0000 (16:45 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 25 Feb 2014 20:29:34 +0000 (21:29 +0100)
The current version of dependency check for virtual package <foo>
defines FOO_CONFIGURE_CMDS to print an error message if the
dependencies are not met.

This patch updates all the virtual packages to use the GNU Make control
function $(error text...) instead.

This makes the error happen at the beginning of the build, with a clearer
message.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/luainterpreter/luainterpreter.mk
package/opengl/libegl/libegl.mk
package/opengl/libgles/libgles.mk
package/opengl/libopenmax/libopenmax.mk
package/opengl/libopenvg/libopenvg.mk
package/powervr/powervr.mk

index c37d621b71e978a8ca4e08ec39279e6adb30132a..54434770540bf7c0dddde9ad413a005d227e2862 100644 (file)
@@ -9,4 +9,10 @@ LUAINTERPRETER_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LUA_INTERPRET
 
 LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION))
 
+ifeq ($(BR2_PACKAGE_HAS_LUA_INTERPRETER),y)
+ifeq ($(LUAINTERPRETER_DEPENDENCIES),)
+$(error No lua interpreter implementation selected. Configuration error.)
+endif
+endif
+
 $(eval $(generic-package))
index b2b74f13a7dfbae31600c82bf1a7ce67c929f271..3311e50104f6d5f87bfcdc807dd5e8eb27782d76 100644 (file)
@@ -7,11 +7,10 @@
 LIBEGL_SOURCE =
 LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_EGL))
 
+ifeq ($(BR2_PACKAGE_HAS_OPENGL_EGL),y)
 ifeq ($(LIBEGL_DEPENDENCIES),)
-define LIBEGL_CONFIGURE_CMDS
-       echo "No libEGL implementation selected. Configuration error."
-       exit 1
-endef
+$(error No libEGL implementation selected. Configuration error.)
+endif
 endif
 
 $(eval $(generic-package))
index 0dcbaa7ddb0a2df425bfc0ac8dc83296a0421f30..7a07e37193e76cd8348ddf187076f4c08825d87a 100644 (file)
@@ -7,11 +7,10 @@
 LIBGLES_SOURCE =
 LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_ES))
 
+ifeq ($(BR2_PACKAGE_HAS_OPENGL_ES),y)
 ifeq ($(LIBGLES_DEPENDENCIES),)
-define LIBGLES_CONFIGURE_CMDS
-       echo "No libGLES implementation selected. Configuration error."
-       exit 1
-endef
+$(error No libGLES implementation selected. Configuration error.)
+endif
 endif
 
 $(eval $(generic-package))
index c4f1f7117dd5e8645c7ed22047858ec1bc594cc5..a2bd23d2ae0ccabfe6ef94bc7121b7615f64ced7 100644 (file)
@@ -7,11 +7,10 @@
 LIBOPENMAX_SOURCE =
 LIBOPENMAX_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENMAX))
 
+ifeq ($(BR2_PACKAGE_HAS_OPENMAX),y)
 ifeq ($(LIBOPENMAX_DEPENDENCIES),)
-define LIBOPENMAX_CONFIGURE_CMDS
-       echo "No libopenmax implementation selected. Configuration error."
-       exit 1
-endef
+$(error No libopenmax implementation selected. Configuration error.)
+endif
 endif
 
 $(eval $(generic-package))
index ffd9d6861ecd9b084a133230c56a50387a20c6e2..f81db5ef16677a6b192ccdf5bb660d4292b17d7e 100644 (file)
@@ -7,11 +7,10 @@
 LIBOPENVG_SOURCE =
 LIBOPENVG_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENVG))
 
+ifeq ($(BR2_PACKAGE_HAS_OPENVG),y)
 ifeq ($(LIBOPENVG_DEPENDENCIES),)
-define LIBOPENVG_CONFIGURE_CMDS
-       echo "No libOpenVG implementation selected. Configuration error."
-       exit 1
-endef
+$(error No libOpenVG implementation selected. Configuration error.)
+endif
 endif
 
 $(eval $(generic-package))
index 1f435056114c7515f57d573504ce765c7a42cb0a..b36eb16b0acf59bdbb09999d8f1ee590a6409618 100644 (file)
@@ -7,11 +7,10 @@
 POWERVR_SOURCE =
 POWERVR_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_POWERVR))
 
+ifeq ($(BR2_PACKAGE_HAS_POWERVR),y)
 ifeq ($(POWERVR_DEPENDENCIES),)
-define POWERVR_CONFIGURE_CMDS
-       echo "No PowerVR implementation selected. Configuration error."
-       exit 1
-endef
+$(error No PowerVR implementation selected. Configuration error.)
+endif
 endif
 
 $(eval $(generic-package))