diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-12-24 12:59:46 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2011-12-24 12:59:46 +0100 |
commit | f176d598536a8935e0e6ab0f8fe730f95fa5544f (patch) | |
tree | 7dd4dd8352ffb40531934a61a142fcc18af3bc8c /mk/macros.packages.mk | |
parent | 5ded895bd79ba192d247716b8a6cffeae9cc70b5 (diff) | |
download | embtoolkit-f176d598536a8935e0e6ab0f8fe730f95fa5544f.tar.gz embtoolkit-f176d598536a8935e0e6ab0f8fe730f95fa5544f.tar.bz2 embtoolkit-f176d598536a8935e0e6ab0f8fe730f95fa5544f.tar.xz |
Build system: Create internal __embtk_download_pkg_from_tarball macro
This will help to introduce other download method beside git and tarball.
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/macros.packages.mk')
-rw-r--r-- | mk/macros.packages.mk | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk index 4dfe4f5..0f2267a 100644 --- a/mk/macros.packages.mk +++ b/mk/macros.packages.mk @@ -467,11 +467,12 @@ define __embtk_download_pkg_from_git test -e $(__embtk_pkg_localgit) || $(call __embtk_gitclone_pkg,$(1)) endef -define embtk_download_pkg - $(call embtk_pinfo,"Download $(__embtk_pkg_name) if needed...") - $(if $(__embtk_pkg_usegit), - $(Q)$(call __embtk_download_pkg_from_git,$(1)), - $(Q)test -e $(__embtk_pkg_package_f) || \ +define __embtk_download_pkg_from_tarball + $(call embtk_echo_blue,"$(__embtk_pkg_name) using tarball") + $(call embtk_echo_blue,"\tVersion : $(__embtk_pkg_version)") + $(call embtk_echo_blue,"\tFrom : $(__embtk_pkg_site)") + $(call embtk_echo_blue,"\tIn : $(__embtk_pkg_package_f)") + test -e $(__embtk_pkg_package_f) || \ $(call embtk_wget, \ $(__embtk_pkg_package), \ $(__embtk_pkg_site), \ @@ -481,7 +482,14 @@ define embtk_download_pkg $(call __embtk_download_pkg_from_mirror,$(1),3) || \ $(call __embtk_download_pkg_exitfailure,$(__embtk_pkg_package_f)) $(call __embtk_download_pkg_patches,$(1)) || \ - $(call __embtk_download_pkg_exitfailure,$(__embtk_pkg_patch_f))) + $(call __embtk_download_pkg_exitfailure,$(__embtk_pkg_patch_f)) +endef + +define embtk_download_pkg + $(call embtk_pinfo,"Download $(__embtk_pkg_name) if needed...") + $(if $(__embtk_pkg_usegit), + $(Q)$(call __embtk_download_pkg_from_git,$(1)), + $(Q)$(call __embtk_download_pkg_from_tarball,$(1))) endef # |