ia64/xen-unstable

view buildconfigs/Rules.mk @ 3856:0fe3bb5ed3aa

bitkeeper revision 1.1205.1.1 (42150936fR3KSFT51o4AFy0i4Fg7Vg)

Merge burn.cl.cam.ac.uk:/local/scratch-1/maf46/xen-unstable.bk/tmp
into burn.cl.cam.ac.uk:/local/scratch-1/maf46/xen-unstable.bk
author maf46@burn.cl.cam.ac.uk
date Thu Feb 17 21:14:30 2005 +0000 (2005-02-17)
parents 0a4b76b6b5a0
children e417ab6438a7 ff8c9a2be5f7
line source
2 # We expect these two to already be set if people
3 # are using the top-level Makefile
4 DISTDIR ?= $(CURDIR)/dist
5 DESTDIR ?= $(DISTDIR)/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)
51 [ -d patches/$* ] && \
52 for i in patches/$*/*.patch ; do ( cd $@ ; patch -p1 <../$$i ) ; done || \
53 true
55 %-build:
56 $(MAKE) -f buildconfigs/mk.$* build
58 %-delete:
59 $(MAKE) -f buildconfigs/mk.$* delete
61 %-clean:
62 $(MAKE) -f buildconfigs/mk.$* clean
64 %-xen.patch: pristine-%
65 rm -rf tmp-$@
66 cp -al $< tmp-$@
67 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
68 diff -Nurp $< tmp-$@ > $@ || true
69 rm -rf tmp-$@
71 %-mrproper: %-mrproper-extra
72 rm -rf pristine-$* $*.tar.bz2
73 rm -rf $*-xen.patch
75 netbsd-%-mrproper-extra:
76 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
77 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
79 %-mrproper-extra:
80 @: # do nothing
82 # never delete any intermediate files.
83 .SECONDARY: