aboutsummaryrefslogtreecommitdiffstats
path: root/buildconfigs/Rules.mk
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-12 13:05:04 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-12 13:05:04 +0000
commit27daa2be17ca314e35e778e41a1ba2a0e3992e3c (patch)
treedf5e74806059a3f3eca4f1b21d0154e9d01e8b20 /buildconfigs/Rules.mk
parentc4d7a1af8e6b8d8c651d6f3efc0180b9ec9c17c8 (diff)
downloadxen-27daa2be17ca314e35e778e41a1ba2a0e3992e3c.tar.gz
xen-27daa2be17ca314e35e778e41a1ba2a0e3992e3c.tar.bz2
xen-27daa2be17ca314e35e778e41a1ba2a0e3992e3c.zip
bitkeeper revision 1.1159.258.115 (428354804NJckGgn06IblzmoXJ6F4A)
Many files: Add additional intermediate tree (e.g. ref-linux-2.6.11) which is a pristine tree with the patches from patches/$(OS)-$(OS_VER) applied. The pristine tree is really pristine now. Also add dependency of ref-$(OS)-$(OS_VER) tree on patches in patches/$(OS)-$(OS_VER). ignore: Add ref-* Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'buildconfigs/Rules.mk')
-rw-r--r--buildconfigs/Rules.mk20
1 files changed, 17 insertions, 3 deletions
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
index b0b0c4697f..60b4fea1db 100644
--- a/buildconfigs/Rules.mk
+++ b/buildconfigs/Rules.mk
@@ -41,6 +41,12 @@ netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
ln -fs $< $@
+ifeq ($(OS),linux)
+OS_VER = $(LINUX_VER)
+else
+OS_VER = $(NETBSD_VER)
+endif
+
pristine-%: %.tar.bz2
rm -rf tmp-$(@F) $@
mkdir -p tmp-$(@F)
@@ -48,9 +54,17 @@ pristine-%: %.tar.bz2
mv tmp-$(@F)/* $@
touch $@ # update timestamp to avoid rebuild
@rm -rf tmp-$(@F)
+
+OS_PATCHES = $(shell echo patches/$(OS)-$(OS_VER)/*.patch)
+
+ref-%: pristine-% $(OS_PATCHES)
+ rm -rf $@
+ cp -al $< tmp-$(@F)
[ -d patches/$* ] && \
- for i in patches/$*/*.patch ; do ( cd $@ ; patch -p1 <../$$i ) ; done || \
+ for i in patches/$*/*.patch ; do ( cd tmp-$(@F) ; patch -p1 <../$$i ) ; done || \
true
+ mv tmp-$(@F) $@
+ touch $@ # update timestamp to avoid rebuild
%-build:
$(MAKE) -f buildconfigs/mk.$* build
@@ -61,7 +75,7 @@ pristine-%: %.tar.bz2
%-clean:
$(MAKE) -f buildconfigs/mk.$* clean
-%-xen.patch: pristine-%
+%-xen.patch: ref-%
rm -rf tmp-$@
cp -al $< tmp-$@
( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
@@ -69,7 +83,7 @@ pristine-%: %.tar.bz2
rm -rf tmp-$@
%-mrproper: %-mrproper-extra
- rm -rf pristine-$* $*.tar.bz2
+ rm -rf pristine-$* ref-$* $*.tar.bz2
rm -rf $*-xen.patch
netbsd-%-mrproper-extra: