If we find a Linux repository in $(LINUX_SRC_PATH) then symlink it

instead of cloning it. This enables developers to keep a linux tree
separate to their xen repository and to make changes there which are
picked up by the Xen build.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
This commit is contained in:
Ian Campbell committed 2007-06-04 15:41:32 +01:00
1 parent 1af8c5189c
commit 7fe901b954
1 file changed
+14 -7
+14 -7
View File
@@ -20,17 +20,24 @@ endif
XEN_LINUX_HGREV ?= tip
$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
set -e ; __repo=$(XEN_LINUX_HGREPO) ; \
if [ ! -d $(LINUX_SRCDIR) ] ; then \
echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
$(HG) clone $${__repo} $(LINUX_SRCDIR) ; \
set -e ; \
if [ ! -e $(LINUX_SRCDIR)/.hg ] ; then \
__repo=$(XEN_LINUX_HGREPO) ; \
if [ -d $${__repo} ] ; then \
echo "Linking $${__repo} to $(LINUX_SRCDIR)." ; \
ln -s $${__repo} $(LINUX_SRCDIR) ; \
else \
echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
$(HG) clone $${__repo} $(LINUX_SRCDIR) ; \
fi ; \
else \
echo "Pulling changes from $${__repo} into $(LINUX_SRCDIR)." ; \
$(HG) -R $(LINUX_SRCDIR) pull $${__repo} ; \
__parent=$$($(HG) -R $(LINUX_SRCDIR) path default) ; \
echo "Pulling changes from $${__parent} into $(LINUX_SRCDIR)." ; \
$(HG) -R $(LINUX_SRCDIR) pull $${__parent} ; \
fi
if [ -n "$(XEN_LINUX_HGREV)" ] ; then \
echo "Updating $(LINUX_SRCDIR) to revision $(XEN_LINUX_HGREV)." ; \
$(HG) update -R $(LINUX_SRCDIR) $(XEN_LINUX_HGREV) ; \
( cd $(LINUX_SRCDIR) && $(HG) update $(XEN_LINUX_HGREV) ); \
fi
touch $@
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.