ia64/xen-unstable

view buildconfigs/Rules.mk @ 3028:dbf307f6b2ca

bitkeeper revision 1.1159.178.1 (419bced9l1RdVC76cT9ARmM2W9UbRg)

Merge scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@scramble.cl.cam.ac.uk
date Wed Nov 17 22:21:13 2004 +0000 (2004-11-17)
parents fd10b3d1ab9a 97eb14e61a7f
children 812f69d3ddb2 032a1cbbba37
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
9 # Setup pristine search path
10 PRISTINE_SRC_PATH ?= .:..
11 vpath pristine-% $(PRISTINE_SRC_PATH)
13 # Expand Linux series to Linux version
14 LINUX_SERIES ?= 2.6
15 LINUX_VER ?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
17 # Setup Linux search path
18 LINUX_SRC_PATH ?= .:..
19 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
21 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
22 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
23 linux-%.tar.bz2:
24 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
25 wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -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 path
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/$@ -O./$@
41 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
42 ln -fs $< $@
44 pristine-%: %.tar.bz2
45 rm -rf tmp-$(@F) $@
46 mkdir -p tmp-$(@F)
47 tar -C tmp-$(@F) -jxf $<
48 mv tmp-$(@F)/* $@
49 touch $@ # update timestamp to avoid rebuild
50 @rm -rf tmp-$(@F)
52 %-build:
53 $(MAKE) -f buildconfigs/mk.$* build
55 %-delete:
56 $(MAKE) -f buildconfigs/mk.$* delete
58 %-clean:
59 $(MAKE) -f buildconfigs/mk.$* clean
61 %-xen.patch: pristine-%
62 rm -rf tmp-$@
63 cp -al $< tmp-$@
64 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
65 diff -Nurp $< tmp-$@ > $@ || true
66 rm -rf tmp-$@
68 %-mrproper: %-mrproper-extra
69 rm -rf pristine-$* $*.tar.bz2
70 rm -rf $*-xen.patch
72 netbsd-%-mrproper-extra:
73 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
74 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
76 %-mrproper-extra:
77 @: # do nothing
79 # never delete any intermediate files.
80 .SECONDARY: