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 18:58:55 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-12 18:58:55 +0000
commitef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2 (patch)
tree8e800819876c55fbc6fe94cf8255f088492e0e48 /buildconfigs/Rules.mk
parent7a61c7cf0c8d03fa9ef756c5c7f47303aa4c347f (diff)
downloadxen-ef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2.tar.gz
xen-ef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2.tar.bz2
xen-ef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2.zip
bitkeeper revision 1.1159.280.1 (4283a76ftpuj_gm_Dw7id90bgDL3JQ)
Many files: Use marker files instead of depending on the change times of directories. ignore: Add patches/*/.makedep. Cleanup ignore list. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'buildconfigs/Rules.mk')
-rw-r--r--buildconfigs/Rules.mk41
1 files changed, 25 insertions, 16 deletions
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
index 60b4fea1db..a2c4cc5ecc 100644
--- a/buildconfigs/Rules.mk
+++ b/buildconfigs/Rules.mk
@@ -4,6 +4,9 @@
DISTDIR ?= $(CURDIR)/dist
DESTDIR ?= $(DISTDIR)/install
+ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
+ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
+
.PHONY: mkpatches mrproper
# Setup pristine search path
@@ -47,23 +50,29 @@ else
OS_VER = $(NETBSD_VER)
endif
-pristine-%: %.tar.bz2
- rm -rf tmp-$(@F) $@
- mkdir -p tmp-$(@F)
- tar -C tmp-$(@F) -jxf $<
- mv tmp-$(@F)/* $@
+$(patsubst %,pristine-%/.valid-pristine,$(ALLSPARSETREES)) : pristine-%/.valid-pristine: %.tar.bz2
+ rm -rf tmp-pristine-$* $(@D)
+ mkdir -p tmp-pristine-$*
+ tar -C tmp-pristine-$* -jxf $<
+ mv tmp-pristine-$*/* $(@D)
+ @rm -rf tmp-pristine-$*
touch $@ # update timestamp to avoid rebuild
- @rm -rf tmp-$(@F)
-OS_PATCHES = $(shell echo patches/$(OS)-$(OS_VER)/*.patch)
+PATCHDIRS := $(wildcard patches/*-*)
+
+-include $(patsubst %,%/.makedep,$(PATCHDIRS))
+
+$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
+ @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
+
+clean::
+ rm -f patches/*/.makedep
-ref-%: pristine-% $(OS_PATCHES)
- rm -rf $@
- cp -al $< tmp-$(@F)
+ref-%/.valid-ref: pristine-%/.valid-pristine
+ rm -rf $(@D)
+ cp -al $(<D) $(@D)
[ -d patches/$* ] && \
- for i in patches/$*/*.patch ; do ( cd tmp-$(@F) ; patch -p1 <../$$i ) ; done || \
- true
- mv tmp-$(@F) $@
+ for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done
touch $@ # update timestamp to avoid rebuild
%-build:
@@ -75,11 +84,11 @@ ref-%: pristine-% $(OS_PATCHES)
%-clean:
$(MAKE) -f buildconfigs/mk.$* clean
-%-xen.patch: ref-%
+%-xen.patch: ref-%/.valid-ref
rm -rf tmp-$@
- cp -al $< tmp-$@
+ cp -al $(<D) tmp-$@
( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
- diff -Nurp $< tmp-$@ > $@ || true
+ diff -Nurp $(<D) tmp-$@ > $@ || true
rm -rf tmp-$@
%-mrproper: %-mrproper-extra