ia64/xen-unstable

annotate buildconfigs/src.hg-clone @ 16650:923b8dbb0fed

Fix some build system error handling.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 20 13:16:21 2007 +0000 (2007-12-20)
parents a1b6555a37bf
children
rev   line source
ian@15251 1 # Mercurial
ian@15251 2 HG ?= hg
ian@15224 3
ian@15224 4 LINUX_SRCDIR ?= linux-$(LINUX_VER)-xen.hg
ian@15224 5
ian@15251 6 # Repository to clone.
ian@15251 7 XEN_LINUX_HGREPO ?= $$(sh buildconfigs/select-repository $(LINUX_SRCDIR) $(LINUX_SRC_PATH))
ian@15251 8
ian@15251 9 # Set XEN_LINUX_HGREV to update to a particlar revision.
ian@15251 10 XEN_LINUX_HGREV ?= tip
ian@15251 11
ian@15251 12 $(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
ian@15270 13 set -e ; \
ian@15270 14 if [ ! -e $(LINUX_SRCDIR)/.hg ] ; then \
ian@15270 15 __repo=$(XEN_LINUX_HGREPO) ; \
ian@15270 16 if [ -d $${__repo} ] ; then \
ian@15270 17 echo "Linking $${__repo} to $(LINUX_SRCDIR)." ; \
ian@15270 18 ln -s $${__repo} $(LINUX_SRCDIR) ; \
ian@15270 19 else \
ian@15270 20 echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
ian@15273 21 $(HG) clone $${__repo#file://} $(LINUX_SRCDIR) ; \
ian@15270 22 fi ; \
ian@15251 23 else \
ian@15270 24 __parent=$$($(HG) -R $(LINUX_SRCDIR) path default) ; \
ian@15270 25 echo "Pulling changes from $${__parent} into $(LINUX_SRCDIR)." ; \
ian@15270 26 $(HG) -R $(LINUX_SRCDIR) pull $${__parent} ; \
ian@15224 27 fi
keir@16650 28 set -e ; if [ -n "$(XEN_LINUX_HGREV)" ] ; then \
ian@15251 29 echo "Updating $(LINUX_SRCDIR) to revision $(XEN_LINUX_HGREV)." ; \
ian@15270 30 ( cd $(LINUX_SRCDIR) && $(HG) update $(XEN_LINUX_HGREV) ); \
ian@15224 31 fi
ian@15224 32 touch $@