ia64/xen-unstable

view buildconfigs/Rules.mk @ 3017:d0006e7baa9a

bitkeeper revision 1.1159.170.41 (419b5697bEIXHXiSbTxwpjfvjHraWw)

Reassert 2.1-devel after push to 2.0 tree.
author kaf24@freefall.cl.cam.ac.uk
date Wed Nov 17 13:48:07 2004 +0000 (2004-11-17)
parents fd10b3d1ab9a
children f0fe276ae088 15785f25998e dbf307f6b2ca 032a1cbbba37
line source
2 .PHONY: mkpatches mrproper
4 # Setup pristine search path
5 PRISTINE_SRC_PATH ?= .:..
6 vpath pristine-% $(PRISTINE_SRC_PATH)
8 # Expand Linux series to Linux version
9 LINUX_SERIES ?= 2.6
10 LINUX_VER ?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
12 # Setup Linux search path
13 LINUX_SRC_PATH ?= .:..
14 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
16 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
17 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
18 linux-%.tar.bz2:
19 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
20 wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
22 # Expand NetBSD release to NetBSD version
23 NETBSD_RELEASE ?= 2.0
24 NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
25 NETBSD_CVSSNAP ?= 20041103
27 # Setup NetBSD search path
28 NETBSD_SRC_PATH ?= .:..
29 vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
31 # download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
32 netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
33 @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
34 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
36 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
37 ln -fs $< $@
39 pristine-%: %.tar.bz2
40 rm -rf tmp-$(@F) $@
41 mkdir -p tmp-$(@F)
42 tar -C tmp-$(@F) -jxf $<
43 mv tmp-$(@F)/* $@
44 touch $@ # update timestamp to avoid rebuild
45 @rm -rf tmp-$(@F)
47 %-build:
48 $(MAKE) -f buildconfigs/mk.$* build
50 %-delete:
51 $(MAKE) -f buildconfigs/mk.$* delete
53 %-clean:
54 $(MAKE) -f buildconfigs/mk.$* clean
56 %-xen.patch: pristine-%
57 rm -rf tmp-$@
58 cp -al $< tmp-$@
59 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
60 diff -Nurp $< tmp-$@ > $@ || true
61 rm -rf tmp-$@
63 %-mrproper: %-mrproper-extra
64 rm -rf pristine-$* $*.tar.bz2
65 rm -rf $*-xen.patch
67 netbsd-%-mrproper-extra:
68 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
69 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
71 %-mrproper-extra:
72 @: # do nothing
74 # never delete any intermediate files.
75 .SECONDARY: