summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-11-15 21:47:05 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-11-15 21:47:05 +0100
commit458df846be9079656c4899bf280f38f18a907af2 (patch)
tree4edda6ef019a1cf6cd95f9f17ce14745ee684f1c /mk
parent168ef0243aa48b38e2686cfc878c7c62f5c393de (diff)
downloadembtoolkit-458df846be9079656c4899bf280f38f18a907af2.tar.gz
embtoolkit-458df846be9079656c4899bf280f38f18a907af2.tar.bz2
embtoolkit-458df846be9079656c4899bf280f38f18a907af2.tar.xz
Build system: git clone internal macro improvement
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r--mk/macros.packages.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk
index e2face7..bf9c8fa 100644
--- a/mk/macros.packages.mk
+++ b/mk/macros.packages.mk
@@ -569,14 +569,15 @@ define __embtk_download_pkg_from_svn
endef
define __embtk_gitclone_pkg
- git clone $(__embtk_pkg_gitsite) $(__embtk_pkg_localgit)
- $(if $(findstring master,$(__embtk_pkg_gitbranch)),,
+ (git clone $(__embtk_pkg_gitsite) $(__embtk_pkg_localgit) && \
+ $(if $(findstring master,$(__embtk_pkg_gitbranch)),, \
cd $(__embtk_pkg_localgit); \
git checkout -b $(__embtk_pkg_gitbranch) \
- origin/$(__embtk_pkg_gitbranch))
- $(if $(findstring HEAD,$(__embtk_pkg_gitrev)),,
+ origin/$(__embtk_pkg_gitbranch) &&) \
+ $(if $(findstring HEAD,$(__embtk_pkg_gitrev)),, \
cd $(__embtk_pkg_localgit); \
- git reset --hard $(__embtk_pkg_gitrev))
+ git reset --hard $(__embtk_pkg_gitrev) &&) \
+ true)
endef
define __embtk_download_pkg_from_git