From ef65d9f9af3cc6f68f2bd4e6618c9a5eab6444c2 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Thu, 12 May 2005 18:58:55 +0000 Subject: 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 --- buildconfigs/Rules.mk | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'buildconfigs/Rules.mk') 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 $( $@ || true + diff -Nurp $( $@ || true rm -rf tmp-$@ %-mrproper: %-mrproper-extra -- cgit v1.2.3