diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-05-12 19:03:36 +0000 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-05-12 19:03:36 +0000 |
commit | 0dee2d158077af7a12a2d7fb17f785e8bad34662 (patch) | |
tree | 8e800819876c55fbc6fe94cf8255f088492e0e48 /buildconfigs/Rules.mk | |
parent | 359e924a86b9ab3bff59af8043e1db088b40a900 (diff) | |
parent | ef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2 (diff) | |
download | xen-0dee2d158077af7a12a2d7fb17f785e8bad34662.tar.gz xen-0dee2d158077af7a12a2d7fb17f785e8bad34662.tar.bz2 xen-0dee2d158077af7a12a2d7fb17f785e8bad34662.zip |
bitkeeper revision 1.1159.258.119 (4283a888gsRWQWQLWB6wIgoYAW7l0Q)
Merge.
Diffstat (limited to 'buildconfigs/Rules.mk')
-rw-r--r-- | buildconfigs/Rules.mk | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk index b740ed988a..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,25 +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 if [[ -e patches/$(OS)-$(OS_VER) ]]; then \ - echo patches/$(OS)-$(OS_VER)/*.patch; fi) +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: @@ -77,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 |