mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
When cloning the kernel repo: 1. make remote called "xen" rather than the default "origin" 2. directly checkout the desired branch in one step Signed-off-by: Jeremy Fitzhardinge<jeremy.fitzhardinge@citrix.com>
30 lines
791 B
Plaintext
30 lines
791 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 -o xen -b $(XEN_LINUX_GIT_REMOTEBRANCH) $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
|
|
mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
|
|
fi
|
|
touch $@
|