summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-01-12 11:17:31 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-01-12 11:19:13 +0100
commit18006fc92a2ff19794aea535c411f8db5bacaf00 (patch)
tree8b4af5944f9c11ee9c570564045dc706ea114bad /mk
parentf0108e8bfa0fcb7b3bec515e95109856757efe6a (diff)
downloadembtoolkit-18006fc92a2ff19794aea535c411f8db5bacaf00.tar.gz
embtoolkit-18006fc92a2ff19794aea535c411f8db5bacaf00.tar.bz2
embtoolkit-18006fc92a2ff19794aea535c411f8db5bacaf00.tar.xz
Build system: embtk_include_pkg: Add optional second parameter specifying package kconfig symbol
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r--mk/pkg-macros/incl.mk19
1 files changed, 13 insertions, 6 deletions
diff --git a/mk/pkg-macros/incl.mk b/mk/pkg-macros/incl.mk
index 0966847..cd85b40 100644
--- a/mk/pkg-macros/incl.mk
+++ b/mk/pkg-macros/incl.mk
@@ -25,18 +25,25 @@
#
# Macros to include a package in the build system
-#
+# $(1): pkgname => pkgname/pkgname.mk should exist (required)
+# $(2): kconfig: package specific kconfig symbol name used in .kconfig
+# This is parameter is optional.
define embtk_include_pkg
- $(eval $(call __embtk_include_pkg,$(1)))
+ $(eval $(call __embtk_include_pkg,$(1),$(2)))
endef
define __embtk_include_pkg
# Is it necessary to include .mk file?
- ifeq (x$(__embtk_pkg_inc_mkinclude),xy)
- include $(dir $(lastword $(MAKEFILE_LIST)))$(pkgv)/$(pkgv).mk
+ $(eval __embtk_inckconfig := $(or $(2),$(PKGV)))
+ $(eval __embtk_incdir := $(dir $(lastword $(MAKEFILE_LIST))))
+ $(eval __embtk_incinstalled-y := $(if $(wildcard $(__embtk_pkg_dotinstalled_f)),y))
+ $(eval __embtk_incenabled-y := $(CONFIG_EMBTK_HAVE_$(__embtk_inckconfig)))
+ $(eval __embtk_incmk-y := $(if $(__embtk_incenabled-y)$(__embtk_incinstalled-y),y))
+ ifeq (x$(__embtk_incmk-y),xy)
+ include $(__embtk_incdir)$(pkgv)/$(pkgv).mk
endif
- ifeq (x$(CONFIG_EMBTK_HAVE_$(PKGV)),xy)
+ ifeq (x$(__embtk_incenabled-y),xy)
ROOTFS_COMPONENTS-y += $(pkgv)_install
- else ifeq (x$(__embtk_pkg_inc_curinstalled),xy)
+ else ifeq (x$(__embtk_incinstalled-y),xy)
ROOTFS_COMPONENTS- += $(pkgv)_install
endif
endef