ia64/xen-unstable

view buildconfigs/Rules.mk @ 8842:79d6a1061ad2

Update x86_32 defconfigs for ISA_DMA_API config change.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Feb 13 14:54:27 2006 +0100 (2006-02-13)
parents 2494b4e00cbb
children b64ac7e90ac6
line source
2 include Config.mk
4 export DESTDIR
6 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
7 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
9 .PHONY: mkpatches mrproper
11 # Setup pristine search path
12 PRISTINE_SRC_PATH ?= .:..
13 vpath pristine-% $(PRISTINE_SRC_PATH)
15 # Let XEN_TARGET_ARCH override ARCH.
16 ifeq ($(XEN_TARGET_ARCH),x86_32)
17 LINUX_ARCH ?= i386
18 else
19 LINUX_ARCH ?= $(XEN_TARGET_ARCH)
20 endif
22 # Expand Linux series to Linux version
23 LINUX_SERIES ?= 2.6
24 LINUX_VER ?= $(shell grep "^LINUX_VER" buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
26 # Setup Linux search path
27 LINUX_SRC_PATH ?= .:..
28 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
29 vpath patch-%.bz2 $(LINUX_SRC_PATH)
31 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
32 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
33 linux-%.tar.bz2:
34 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
35 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
37 patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
38 patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
39 patch-%.bz2:
40 @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
41 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
43 # Expand NetBSD release to NetBSD version
44 NETBSD_RELEASE ?= 2.0
45 NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
46 NETBSD_CVSSNAP ?= 20050309
48 # Setup NetBSD search path
49 NETBSD_SRC_PATH ?= .:..
50 vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
52 # download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
53 netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
54 @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
55 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
57 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
58 ln -fs $< $@
60 ifeq ($(OS),linux)
61 OS_VER = $(LINUX_VER)
62 else
63 OS_VER = $(NETBSD_VER)
64 endif
66 pristine-%: pristine-%/.valid-pristine
67 @true
69 pristine-%/.valid-pristine: %.tar.bz2
70 rm -rf tmp-pristine-$* $(@D)
71 mkdir -p tmp-pristine-$*
72 tar -C tmp-pristine-$* -jxf $<
73 -@rm tmp-pristine-$*/pax_global_header
74 mv tmp-pristine-$*/* $(@D)
75 @rm -rf tmp-pristine-$*
76 touch $(@D)/.hgskip
77 touch $@ # update timestamp to avoid rebuild
79 PATCHDIRS := $(wildcard patches/*-*)
81 ifneq ($(PATCHDIRS),)
82 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
84 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
85 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
87 clean::
88 rm -f patches/*/.makedep
90 ref-%/.valid-ref: pristine-%/.valid-pristine
91 set -e
92 rm -rf $(@D)
93 cp -al $(<D) $(@D)
94 if [ -d patches/$* ] ; then \
95 for i in patches/$*/*.patch ; do patch -d $(@D) -p1 <$$i || exit 1 ; done ; \
96 fi
97 touch $@ # update timestamp to avoid rebuild
98 endif
100 %-prep:
101 $(MAKE) -f buildconfigs/mk.$* prep
103 %-install:
104 $(MAKE) -f buildconfigs/mk.$* build
106 %-dist: DESTDIR=$(DISTDIR)/install
107 %-dist: %-install
108 @: # do nothing
110 # Legacy dist target
111 %-build: %-dist
112 @: # do nothing
114 %-delete:
115 $(MAKE) -f buildconfigs/mk.$* delete
117 %-clean:
118 $(MAKE) -f buildconfigs/mk.$* clean
120 %-config:
121 $(MAKE) -f buildconfigs/mk.$* config
123 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
124 rm -rf tmp-$@
125 cp -al $(<D) tmp-$@
126 ( cd linux-2.6-xen-sparse && ./mkbuildtree ../tmp-$@ )
127 diff -Nurp $(<D) tmp-$@ > $@ || true
128 rm -rf tmp-$@
130 %-xen.patch: ref-%/.valid-ref
131 rm -rf tmp-$@
132 cp -al $(<D) tmp-$@
133 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
134 diff -Nurp $(<D) tmp-$@ > $@ || true
135 rm -rf tmp-$@
137 %-mrproper: %-mrproper-extra
138 rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
139 rm -rf $*-xen.patch
141 netbsd-%-mrproper-extra:
142 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
143 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
145 %-mrproper-extra:
146 @: # do nothing
148 config-update-pae:
149 ifeq ($(XEN_TARGET_X86_PAE),y)
150 sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
151 else
152 grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
153 endif
155 # never delete any intermediate files.
156 .SECONDARY: