summaryrefslogtreecommitdiff
path: root/core/mk/pkg-macros
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-05-10 17:58:42 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-05-10 17:58:42 +0200
commit5d44167723c5b863b69f9fa08a9e220e941a44d7 (patch)
tree2809248bf61d8f627ae3073888da8f1abf95fa0b /core/mk/pkg-macros
parentdc75991cc4c23d2675aa357692ed26d7d21e569c (diff)
downloadembtoolkit-5d44167723c5b863b69f9fa08a9e220e941a44d7.tar.gz
embtoolkit-5d44167723c5b863b69f9fa08a9e220e941a44d7.tar.bz2
embtoolkit-5d44167723c5b863b69f9fa08a9e220e941a44d7.tar.xz
Build system: tweak embtk_install_{,host}pkg and use common codes
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'core/mk/pkg-macros')
-rw-r--r--core/mk/pkg-macros/install.mk53
1 files changed, 27 insertions, 26 deletions
diff --git a/core/mk/pkg-macros/install.mk b/core/mk/pkg-macros/install.mk
index b8eed7e..56abe02 100644
--- a/core/mk/pkg-macros/install.mk
+++ b/core/mk/pkg-macros/install.mk
@@ -161,13 +161,31 @@ define __embtk_install_pkgdeps
$(foreach dep,$(__embtk_pkg_depspkgv),$(call embtk_install_xpkg,$(dep)))
endef
-__embtk_autotoolspkg-y=$(2)
-define __embtk_install_pkg_make
+define __embtk_preinstall_pkg
$(call __embtk_install_pkgdeps,$(1))
$(call embtk_pinfo,"Compile/Install $(__embtk_pkg_name)-$(__embtk_pkg_version) in your root filesystem...")
$(call embtk_download_pkg,$(1))
$(call embtk_decompress_pkg,$(1))
$(if $(embtk_beforeinstall_$(pkgv)),$(embtk_beforeinstall_$(pkgv)))
+endef
+define __embtk_preinstall_hostpkg
+ $(call __embtk_install_pkgdeps,$(1))
+ $(call embtk_pinfo,"Compile/Install $(__embtk_pkg_name)-$(__embtk_pkg_version) for host...")
+ $(call embtk_download_pkg,$(1))
+ $(call embtk_decompress_pkg,$(1))
+ $(if $(embtk_beforeinstall_$(pkgv)),$(embtk_beforeinstall_$(pkgv)))
+endef
+define __embtk_postinstall_pkg
+ $(call __embtk_setinstalled_pkg,$(1))
+ $(call __embtk_pkg_gen_dotkconfig_f,$(1))
+ $(eval __embtk_$(pkgv)_installed = y)
+ $(embtk_postinstallonce_$(pkgv))
+ $(call __embtk_wipeoutworkspace_pkg,$(1))
+endef
+
+__embtk_autotoolspkg-y=$(2)
+define __embtk_install_pkg_make
+ $(call __embtk_preinstall_pkg,$(1))
$(if $(__embtk_autotoolspkg-y),$(call embtk_configure_pkg,$(1)))
$(if $(__embtk_pkg_makedirs), \
$(__embtk_multi_make), \
@@ -178,16 +196,10 @@ define __embtk_install_pkg_make
$(if $(__embtk_autotoolspkg-y)$(__embtk_pkg_pkgconfigs),
$(call __embtk_fix_libtool_files)
$(call __embtk_fix_pkgconfig_files))
- $(call __embtk_setinstalled_pkg,$(1))
- $(call __embtk_pkg_gen_dotkconfig_f,$(1))
- $(eval __embtk_$(pkgv)_installed = y)
+ $(call __embtk_postinstall_pkg,$(1))
endef
define __embtk_install_hostpkg_make
- $(call __embtk_install_pkgdeps,$(1))
- $(call embtk_pinfo,"Compile/Install $(__embtk_pkg_name)-$(__embtk_pkg_version) for host...")
- $(call embtk_download_pkg,$(1))
- $(call embtk_decompress_pkg,$(1))
- $(if $(embtk_beforeinstall_$(pkgv)),$(embtk_beforeinstall_$(pkgv)))
+ $(call __embtk_preinstall_hostpkg,$(1))
$(if $(__embtk_autotoolspkg-y),$(call embtk_configure_hostpkg,$(1)))
$(if $(__embtk_pkg_makedirs), \
$(__embtk_multi_make), \
@@ -195,9 +207,7 @@ define __embtk_install_hostpkg_make
$(if $(__embtk_pkg_makedirs), \
$(__embtk_multi_make_hostinstall), \
$(__embtk_single_make_hostinstall))
- $(call __embtk_setinstalled_pkg,$(1))
- $(call __embtk_pkg_gen_dotkconfig_f,$(1))
- $(eval __embtk_$(pkgv)_installed = y)
+ $(call __embtk_postinstall_pkg,$(1))
endef
#
@@ -259,10 +269,7 @@ endef
define __embtk_install_pkg
$(if $(__embtk_pkg_runrecipe-y),
$(Q)mkdir -p $(__embtk_pkg_builddir)
- $(Q)$(call __embtk_install_pkg_make,$(1),autotools)
- $(embtk_postinstallonce_$(pkgv))
- $(call __embtk_wipeoutworkspace_pkg,$(1)))
- $(call __embtk_wipeoutworkspace_pkg,$(1))
+ $(Q)$(call __embtk_install_pkg_make,$(1),autotools))
$(embtk_postinstall_$(pkgv))
endef
@@ -276,9 +283,7 @@ define embtk_makeinstall_pkg
$(if $(__embtk_xinstall_xpkg_allvarset-y),
$(if $(__embtk_pkg_runrecipe-y),
$(Q)mkdir -p $(__embtk_pkg_builddir)
- $(Q)$(call __embtk_install_pkg_make,$(1))
- $(embtk_postinstallonce_$(pkgv))
- $(call __embtk_wipeoutworkspace_pkg,$(1)))
+ $(Q)$(call __embtk_install_pkg_make,$(1)))
$(embtk_postinstall_$(pkgv)),
$(call __embtk_install_paramsfailure,$(1)))
endef
@@ -297,9 +302,7 @@ endef
define __embtk_install_hostpkg
$(if $(__embtk_pkg_runrecipe-y),
$(Q)mkdir -p $(__embtk_pkg_builddir)
- $(Q)$(call __embtk_install_hostpkg_make,$(1),autotools)
- $(embtk_postinstallonce_$(pkgv))
- $(call __embtk_wipeoutworkspace_pkg,$(1)))
+ $(Q)$(call __embtk_install_hostpkg_make,$(1),autotools))
$(embtk_postinstall_$(pkgv))
endef
@@ -313,9 +316,7 @@ define embtk_makeinstall_hostpkg
$(if $(__embtk_xinstall_xpkg_allvarset-y),
$(if $(__embtk_pkg_runrecipe-y),
$(Q)mkdir -p $(__embtk_pkg_builddir)
- $(Q)$(call __embtk_install_hostpkg_make,$(1))
- $(embtk_postinstallonce_$(pkgv))
- $(call __embtk_wipeoutworkspace_pkg,$(1)))
+ $(Q)$(call __embtk_install_hostpkg_make,$(1)))
$(embtk_postinstall_$(pkgv)),
$(call __embtk_install_paramsfailure,$(1)))
endef