mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
git 1.4.x (which is on even some moderately recent systems) doesn't have the `git remote' command. This is what caused the most recent patchman build failure. The machinery in buildconfigs/src.git-clone was rather more complicated than needed, too. In this patch I replace this with a similar set of runes to those used for ioemu-remote (almost identical except that the QEMU_TAG feature is not supported in this instance). I have done a successful test build with this change. Cc: Ian Campbell <Ian.Campbell@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
32 lines
837 B
Plaintext
32 lines
837 B
Plaintext
# Mercurial
|
|
GIT ?= git
|
|
|
|
LINUX_SRCDIR ?= linux-$(LINUX_VER).git
|
|
|
|
# The URL of the remote GIT repository
|
|
ifeq ($(XEN_LINUX_GIT_URL),)
|
|
.ERROR: XEN_LINUX_GIT_URL not specified
|
|
endif
|
|
|
|
# The branch in the remote repository
|
|
ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),)
|
|
.ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified
|
|
endif
|
|
|
|
XEN_LINUX_GIT_LOCALBRANCH ?= master
|
|
|
|
# Set XEN_LINUX_GITREV to update to a particlar revision.
|
|
XEN_LINUX_GITREV ?=
|
|
|
|
$(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 $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
|
|
cd $(LINUX_SRCDIR).tmp; \
|
|
$(GIT) checkout $(XEN_LINUX_GIT_REMOTEBRANCH); \
|
|
cd ..; mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
|
|
fi
|
|
touch $@
|