summaryrefslogtreecommitdiff
path: root/mk/macros.packages.mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-11-06 23:06:41 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-11-06 23:06:41 +0100
commitb12854ccb3819472185c706628565522322a61fa (patch)
tree1d86c1d0854f3b3a7384f0bfd48b5cb1376751a8 /mk/macros.packages.mk
parentac836d579b1f8d0af45eb7b0e392da0df878402f (diff)
downloadembtoolkit-b12854ccb3819472185c706628565522322a61fa.tar.gz
embtoolkit-b12854ccb3819472185c706628565522322a61fa.tar.bz2
embtoolkit-b12854ccb3819472185c706628565522322a61fa.tar.xz
Build system: give ability to packages to define there install macro
With this patch packages can define their own install macro, instead of using the default. To do so, packages must define the macro: define embtk_install_{pkgname} .... .... endef The build system will automatically call it Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/macros.packages.mk')
-rw-r--r--mk/macros.packages.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk
index 4b74cc3..8d0fbd6 100644
--- a/mk/macros.packages.mk
+++ b/mk/macros.packages.mk
@@ -448,11 +448,15 @@ __embtk_xinstall_xpkg_allvarset-y = $(and $(__embtk_pkg_name), \
# Usage:
# $(call embtk_install_pkg,package)
#
+define __embtk_install_pkg
+ $(if $(__embtk_pkg_installed-y),true,
+ $(call __embtk_install_pkg_make,$(1),autotools))
+ $(if $(embtk_postinstall_$(pkgv)),$(embtk_postinstall_$(pkgv)))
+endef
+
define embtk_install_pkg
$(if $(__embtk_xinstall_xpkg_allvarset-y),
- $(if $(__embtk_pkg_installed-y),true,
- $(call __embtk_install_pkg_make,$(1),autotools))
- $(if $(embtk_postinstall_$(pkgv)),$(embtk_postinstall_$(pkgv))),
+ $(or $(embtk_install_$(pkgv)),$(call __embtk_install_pkg,$(1))),
$(call __embtk_install_paramsfailure,$(1)))
endef