diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-05-12 19:09:17 +0000 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-05-12 19:09:17 +0000 |
commit | 6ce4e97f0240d24261e6ff684be864f593074aed (patch) | |
tree | 136a3061ddabe0bc751ff66c5058472c869e9aaa /buildconfigs/Rules.mk | |
parent | 739050b06332bbbcafc9e845d55f69ad06faaec5 (diff) | |
parent | 0dee2d158077af7a12a2d7fb17f785e8bad34662 (diff) | |
download | xen-6ce4e97f0240d24261e6ff684be864f593074aed.tar.gz xen-6ce4e97f0240d24261e6ff684be864f593074aed.tar.bz2 xen-6ce4e97f0240d24261e6ff684be864f593074aed.zip |
bitkeeper revision 1.1389.1.53 (4283a9ddh938uAD1Jnb_4rll_ioGBw)
Merge Makefile changes.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'buildconfigs/Rules.mk')
-rw-r--r-- | buildconfigs/Rules.mk | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk index 11f4009525..1e65484b36 100644 --- a/buildconfigs/Rules.mk +++ b/buildconfigs/Rules.mk @@ -6,6 +6,9 @@ include Config.mk 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 @@ -49,24 +52,30 @@ 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)/* $@ - touch $@ # update timestamp to avoid rebuild +$(patsubst %,pristine-%/.valid-pristine,$(ALLSPARSETREES)) : pristine-%/.valid-pristine: %.tar.bz2 + rm -rf tmp-pristine-$* $(@D) + mkdir -p tmp-pristine-$* touch $@/.bk_skip - @rm -rf tmp-$(@F) + tar -C tmp-pristine-$* -jxf $< + mv tmp-pristine-$*/* $(@D) + @rm -rf tmp-pristine-$* + touch $@ # update timestamp to avoid rebuild + +PATCHDIRS := $(wildcard patches/*-*) + +-include $(patsubst %,%/.makedep,$(PATCHDIRS)) + +$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: + @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@ -OS_PATCHES = $(shell echo patches/$(OS)-$(OS_VER)/*.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: @@ -81,11 +90,11 @@ ref-%: pristine-% $(OS_PATCHES) %-config: $(MAKE) -f buildconfigs/mk.$* config -%-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 |