ia64/xen-unstable

view buildconfigs/Rules.mk @ 5197:7c8e84ee36b2

bitkeeper revision 1.1588 (42999d00gxHg_hThncByjrGk7labNA)

Tidy up and fix the bit-scanning operations. In particular,
find_{first,next}_[zero_]bit(addr, max) may return any value >= max
if no suitable bit is found. This is now also the case for first_cpu()
and next_cpu() (unlike Linux!). I don't believe that any callers
care -- they always check for >= NR_CPUS, and I fixed any_online_cpu()
separately. This reduces code size and will improve performance.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun May 29 10:44:16 2005 +0000 (2005-05-29)
parents 650b80c41719
children f915b63407b4 f2c023b9a070 649cd37aa1ab
line source
2 include Config.mk
4 # We expect these two to already be set if people
5 # are using the top-level Makefile
6 DISTDIR ?= $(CURDIR)/dist
7 DESTDIR ?= $(DISTDIR)/install
9 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
10 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
12 .PHONY: mkpatches mrproper
14 # Setup pristine search path
15 PRISTINE_SRC_PATH ?= .:..
16 vpath pristine-% $(PRISTINE_SRC_PATH)
18 # Expand Linux series to Linux version
19 LINUX_SERIES ?= 2.6
20 LINUX_VER ?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
22 # Setup Linux search path
23 LINUX_SRC_PATH ?= .:..
24 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
26 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
27 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
28 linux-%.tar.bz2:
29 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
30 wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
32 # Expand NetBSD release to NetBSD version
33 NETBSD_RELEASE ?= 2.0
34 NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
35 NETBSD_CVSSNAP ?= 20050309
37 # Setup NetBSD search path
38 NETBSD_SRC_PATH ?= .:..
39 vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
41 # download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
42 netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
43 @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
44 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
46 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
47 ln -fs $< $@
49 ifeq ($(OS),linux)
50 OS_VER = $(LINUX_VER)
51 else
52 OS_VER = $(NETBSD_VER)
53 endif
55 $(patsubst %,pristine-%/.valid-pristine,$(ALLSPARSETREES)) : pristine-%/.valid-pristine: %.tar.bz2
56 rm -rf tmp-pristine-$* $(@D)
57 mkdir -p tmp-pristine-$*
58 touch tmp-pristine-$*/.bk_skip
59 tar -C tmp-pristine-$* -jxf $<
60 mv tmp-pristine-$*/* $(@D)
61 @rm -rf tmp-pristine-$*
62 touch $@ # update timestamp to avoid rebuild
64 PATCHDIRS := $(wildcard patches/*-*)
66 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
68 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
69 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
71 clean::
72 rm -f patches/*/.makedep
74 ref-%/.valid-ref: pristine-%/.valid-pristine
75 rm -rf $(@D)
76 cp -al $(<D) $(@D)
77 ([ -d patches/$* ] && \
78 for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done) || true
79 touch $@ # update timestamp to avoid rebuild
81 %-build:
82 $(MAKE) -f buildconfigs/mk.$* build
84 %-delete:
85 $(MAKE) -f buildconfigs/mk.$* delete
87 %-clean:
88 $(MAKE) -f buildconfigs/mk.$* clean
90 %-config:
91 $(MAKE) -f buildconfigs/mk.$* config
93 %-xen.patch: ref-%/.valid-ref
94 rm -rf tmp-$@
95 cp -al $(<D) tmp-$@
96 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
97 diff -Nurp $(<D) tmp-$@ > $@ || true
98 rm -rf tmp-$@
100 %-mrproper: %-mrproper-extra
101 rm -rf pristine-$* ref-$* $*.tar.bz2
102 rm -rf $*-xen.patch
104 netbsd-%-mrproper-extra:
105 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
106 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
108 %-mrproper-extra:
109 @: # do nothing
111 # never delete any intermediate files.
112 .SECONDARY: