diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-12 08:43:47 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-12 08:43:47 +0100 |
commit | 96e41900457d66aedbb85647e48a431a575bcdfa (patch) | |
tree | 40e50bed5ecf8df3cebf2e162141b39bb061d9fb | |
parent | ed562546ce8d129a7e708e2111b905a064a0b359 (diff) | |
download | xen-96e41900457d66aedbb85647e48a431a575bcdfa.tar.gz xen-96e41900457d66aedbb85647e48a431a575bcdfa.tar.bz2 xen-96e41900457d66aedbb85647e48a431a575bcdfa.zip |
Honour XEN_LINUX_GIT_LOCALBRANCH and XEN_LINUX_GITREV variables
XEN_GIT_ORIGIN to set the name of the remote origin; the default is
still "xen".
XEN_LINUX_GIT_LOCALBRANCH allows the name of the local branch to be
set. The default is the same as the remote branch.
XEN_LINUX_GITREV allows a specific GIT revision to be checked out,
rather than a branch. By default it is the remote branch name.
This change should result in no change in behaviour in the normal
case.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-rw-r--r-- | buildconfigs/src.git-clone | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/buildconfigs/src.git-clone b/buildconfigs/src.git-clone index cc918e7408..35865e1f1f 100644 --- a/buildconfigs/src.git-clone +++ b/buildconfigs/src.git-clone @@ -13,18 +13,20 @@ ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),) .ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified endif -XEN_LINUX_GIT_LOCALBRANCH ?= master +XEN_GIT_ORIGIN ?= xen + +XEN_LINUX_GIT_LOCALBRANCH ?= $(XEN_LINUX_GIT_REMOTEBRANCH) # Set XEN_LINUX_GITREV to update to a particlar revision. -XEN_LINUX_GITREV ?= +XEN_LINUX_GITREV ?= $(XEN_GIT_ORIGIN)/$(XEN_LINUX_GIT_REMOTEBRANCH) $(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE) set -ex; \ if ! [ -d $(LINUX_SRCDIR) ]; then \ rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \ mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \ - $(GIT) clone -o xen -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \ - (cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_REMOTEBRANCH) xen/$(XEN_LINUX_GIT_REMOTEBRANCH) ); \ + $(GIT) clone -o $(XEN_GIT_ORIGIN) -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \ + (cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_LOCALBRANCH) $(XEN_LINUX_GITREV) ); \ mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \ fi touch $@ |