ia64/xen-unstable

view buildconfigs/Rules.mk @ 3004:2bebf77dc30e

bitkeeper revision 1.1159.175.1 (419a9b9dCZLKnt1tKvFYyV5cDeDbmQ)

Clean up drivers/char/mem.c patch.
author iap10@labyrinth.cl.cam.ac.uk
date Wed Nov 17 00:30:21 2004 +0000 (2004-11-17)
parents 574f6a7c8697
children 2a69594a92dc
line source
2 # We expect these two to already be set if people
3 # are using the top-level Makefile
4 DIST_DIR ?= $(shell pwd)/dist
5 INSTALL_DIR ?= $(DIST_DIR)/install
7 .PHONY: mkpatches mrproper
11 # Expand Linux series to Linux version
12 LINUX_SERIES ?= 2.6
13 LINUX_VER ?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
15 # Setup Linux search patch
16 LINUX_SRC_PATH ?= .:..
17 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
19 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
20 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
21 linux-%.tar.bz2:
22 @echo "Cannot find linux-$*.tar.bz2 in path $(LINUX_SRC_PATH)"
23 wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/linux-$*.tar.bz2 -O./$@
27 # Expand NetBSD release to NetBSD version
28 NETBSD_RELEASE ?= 2.0
29 NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
30 NETBSD_CVSSNAP ?= 20041103
32 # Setup NetBSD search patch
33 NETBSD_SRC_PATH ?= .:..
34 vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
36 # download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
37 netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
38 @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
39 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2 -O./$@
41 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
42 ln -fs $< $@
47 pristine-%: %.tar.bz2
48 rm -rf tmp-$* $@ && \
49 mkdir -p tmp-$* && \
50 tar -C tmp-$* -jxf $< && \
51 mv tmp-$*/* $@
52 touch $@ # update timestamp to avoid rebuild
53 @rm -rf tmp-$*
55 %-xen.patch: pristine-%
56 rm -rf tmp-$@
57 cp -al pristine-$* tmp-$@
58 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
59 diff -Nurp pristine-$* tmp-$@ > $@ || true
60 rm -rf tmp-$@
62 %-mrproper: %-mrproper-extra
63 rm -rf pristine-$* $*.tar.bz2
64 rm -rf $*-xen.patch
66 netbsd-%-mrproper-extra:
67 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
68 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
70 %-mrproper-extra:
71 @: # do nothing
73 # never delete any intermediate files.
74 .SECONDARY: