aboutsummaryrefslogtreecommitdiffstats
path: root/buildconfigs
diff options
context:
space:
mode:
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>2004-11-08 13:44:07 +0000
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>2004-11-08 13:44:07 +0000
commit31a94a2dd79bb3439a5a81dd0be4919a92a1f6ec (patch)
tree4a50fade296fa94af19719a92d391dd4fd70b779 /buildconfigs
parent7c8c63a25ac6db59ce9c1b3e5449ccb0b54a44fd (diff)
downloadxen-31a94a2dd79bb3439a5a81dd0be4919a92a1f6ec.tar.gz
xen-31a94a2dd79bb3439a5a81dd0be4919a92a1f6ec.tar.bz2
xen-31a94a2dd79bb3439a5a81dd0be4919a92a1f6ec.zip
bitkeeper revision 1.1159.1.391 (418f7827YLyC-prphpkCX_StMMQ_9g)
Add PRISTINE_SRC_PATH to allow sharing of pristine trees between repositories.
Diffstat (limited to 'buildconfigs')
-rw-r--r--buildconfigs/Rules.mk28
-rw-r--r--buildconfigs/mk.linux-2.4-xen02
-rw-r--r--buildconfigs/mk.linux-2.4-xenU2
-rw-r--r--buildconfigs/mk.linux-2.6-xen02
-rw-r--r--buildconfigs/mk.linux-2.6-xenU2
-rw-r--r--buildconfigs/mk.netbsd-2.0-xenU2
6 files changed, 21 insertions, 17 deletions
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
index 99405f8415..31e8c8e8c7 100644
--- a/buildconfigs/Rules.mk
+++ b/buildconfigs/Rules.mk
@@ -7,20 +7,24 @@ INSTALL_DIR ?= $(DIST_DIR)/install
.PHONY: mkpatches mrproper
+# Setup pristine search path
+PRISTINE_SRC_PATH ?= .:..
+vpath pristine-% $(PRISTINE_SRC_PATH)
+
# Expand Linux series to Linux version
LINUX_SERIES ?= 2.6
LINUX_VER ?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
-# Setup Linux search patch
+# Setup Linux search path
LINUX_SRC_PATH ?= .:..
vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
linux-%.tar.bz2:
- @echo "Cannot find linux-$*.tar.bz2 in path $(LINUX_SRC_PATH)"
- wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/linux-$*.tar.bz2 -O./$@
+ @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
+ wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
@@ -29,14 +33,14 @@ NETBSD_RELEASE ?= 2.0
NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
NETBSD_CVSSNAP ?= 20041103
-# Setup NetBSD search patch
+# Setup NetBSD search path
NETBSD_SRC_PATH ?= .:..
vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
# download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
@echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
- wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2 -O./$@
+ wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
ln -fs $< $@
@@ -45,18 +49,18 @@ netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
pristine-%: %.tar.bz2
- rm -rf tmp-$* $@ && \
- mkdir -p tmp-$* && \
- tar -C tmp-$* -jxf $< && \
- mv tmp-$*/* $@
+ rm -rf tmp-$(@F) $@
+ mkdir -p tmp-$(@F)
+ tar -C tmp-$(@F) -jxf $<
+ mv tmp-$(@F)/* $@
touch $@ # update timestamp to avoid rebuild
- @rm -rf tmp-$*
+ @rm -rf tmp-$(@F)
%-xen.patch: pristine-%
rm -rf tmp-$@
- cp -al pristine-$* tmp-$@
+ cp -al $< tmp-$@
( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
- diff -Nurp pristine-$* tmp-$@ > $@ || true
+ diff -Nurp $< tmp-$@ > $@ || true
rm -rf tmp-$@
%-mrproper: %-mrproper-extra
diff --git a/buildconfigs/mk.linux-2.4-xen0 b/buildconfigs/mk.linux-2.4-xen0
index 525d31fda8..b9f852eff8 100644
--- a/buildconfigs/mk.linux-2.4-xen0
+++ b/buildconfigs/mk.linux-2.4-xen0
@@ -24,7 +24,7 @@ patches/tmp/ebtables.diff:
$(LINUX_DIR)/include/linux/autoconf.h: patches/tmp/ebtables.diff
$(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
rm -rf $(LINUX_DIR)
- cp -al pristine-linux-$(LINUX_VER) $(LINUX_DIR)
+ cp -al $< $(LINUX_DIR)
# Apply arch-xen patches
( cd linux-$(LINUX_VER)-xen-sparse ; \
./mkbuildtree ../$(LINUX_DIR) )
diff --git a/buildconfigs/mk.linux-2.4-xenU b/buildconfigs/mk.linux-2.4-xenU
index b7d5da4325..a0937de4f6 100644
--- a/buildconfigs/mk.linux-2.4-xenU
+++ b/buildconfigs/mk.linux-2.4-xenU
@@ -19,7 +19,7 @@ build: $(LINUX_DIR)/include/linux/autoconf.h
$(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
rm -rf $(LINUX_DIR)
- cp -al pristine-linux-$(LINUX_VER) $(LINUX_DIR)
+ cp -al $< $(LINUX_DIR)
# Apply arch-xen patches
( cd linux-$(LINUX_VER)-xen-sparse ; \
./mkbuildtree ../$(LINUX_DIR) )
diff --git a/buildconfigs/mk.linux-2.6-xen0 b/buildconfigs/mk.linux-2.6-xen0
index 7e1020941e..bb7bf57ec4 100644
--- a/buildconfigs/mk.linux-2.6-xen0
+++ b/buildconfigs/mk.linux-2.6-xen0
@@ -19,7 +19,7 @@ build: $(LINUX_DIR)/include/linux/autoconf.h
# The real action starts here!
$(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
rm -rf $(LINUX_DIR)
- cp -al pristine-linux-$(LINUX_VER) $(LINUX_DIR)
+ cp -al $< $(LINUX_DIR)
# Apply arch-xen patches
( cd linux-$(LINUX_VER)-xen-sparse ; \
./mkbuildtree ../$(LINUX_DIR) )
diff --git a/buildconfigs/mk.linux-2.6-xenU b/buildconfigs/mk.linux-2.6-xenU
index 2b96fc4467..3f3b84b2de 100644
--- a/buildconfigs/mk.linux-2.6-xenU
+++ b/buildconfigs/mk.linux-2.6-xenU
@@ -20,7 +20,7 @@ build: $(LINUX_DIR)/include/linux/autoconf.h
$(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
rm -rf $(LINUX_DIR)
- cp -al pristine-linux-$(LINUX_VER) $(LINUX_DIR)
+ cp -al $< $(LINUX_DIR)
# Apply arch-xen patches
( cd linux-$(LINUX_VER)-xen-sparse ; \
./mkbuildtree ../$(LINUX_DIR) )
diff --git a/buildconfigs/mk.netbsd-2.0-xenU b/buildconfigs/mk.netbsd-2.0-xenU
index 060f7e7570..55a802f143 100644
--- a/buildconfigs/mk.netbsd-2.0-xenU
+++ b/buildconfigs/mk.netbsd-2.0-xenU
@@ -24,7 +24,7 @@ netbsd-%-tools: netbsd-%-tools.tar.bz2
$(NETBSD_DIR)/.valid: pristine-netbsd-$(NETBSD_VER)
$(RM) -rf $(NETBSD_DIR)
- cp -al pristine-netbsd-$(NETBSD_VER) $(NETBSD_DIR)
+ cp -al $< $(NETBSD_DIR)
# Apply arch-xen patches
( cd netbsd-$(NETBSD_VER)-xen-sparse ; \
./mkbuildtree ../$(NETBSD_DIR) )