ia64/xen-unstable

view buildconfigs/Rules.mk @ 9788:bdcc838b9a72

Add small memory warning message to domain configuration examples.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@dyn9047022152.beaverton.ibm.com
date Wed Apr 19 22:58:24 2006 +0100 (2006-04-19)
parents 3c05406f5e0a
children ef80b6e4e03a
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 # Setup pristine search path
10 PRISTINE_SRC_PATH ?= .:..
11 vpath pristine-% $(PRISTINE_SRC_PATH)
13 # Let XEN_TARGET_ARCH override ARCH.
14 ifeq ($(XEN_TARGET_ARCH),x86_32)
15 LINUX_ARCH ?= i386
16 else
17 LINUX_ARCH ?= $(XEN_TARGET_ARCH)
18 endif
20 # Expand Linux series to Linux version
21 LINUX_SERIES ?= 2.6
22 LINUX_VER ?= $(shell grep "^LINUX_VER" buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
24 # Setup Linux search path
25 LINUX_SRC_PATH ?= .:..
26 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
27 vpath patch-%.bz2 $(LINUX_SRC_PATH)
29 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
30 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
31 linux-%.tar.bz2:
32 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
33 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
35 patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
36 patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
37 patch-%.bz2:
38 @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
39 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
41 pristine-%: pristine-%/.valid-pristine
42 @true
44 pristine-%/.valid-pristine: %.tar.bz2
45 rm -rf tmp-pristine-$* $(@D)
46 mkdir -p tmp-pristine-$*
47 tar -C tmp-pristine-$* -jxf $<
48 -@rm -f tmp-pristine-$*/pax_global_header
49 mv tmp-pristine-$*/* $(@D)
50 @rm -rf tmp-pristine-$*
51 touch $(@D)/.hgskip
52 touch $@ # update timestamp to avoid rebuild
54 PATCHDIRS := $(wildcard patches/*-*)
56 ifneq ($(PATCHDIRS),)
57 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
59 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
60 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
62 .PHONY: clean
63 clean::
64 rm -f patches/*/.makedep
66 ref-%/.valid-ref: pristine-%/.valid-pristine
67 set -e
68 rm -rf $(@D)
69 cp -al $(<D) $(@D)
70 if [ -d patches/$* ] ; then \
71 for i in patches/$*/*.patch ; do patch -d $(@D) -p1 <$$i || exit 1 ; done ; \
72 fi
73 touch $@ # update timestamp to avoid rebuild
74 endif
76 %-prep:
77 $(MAKE) -f buildconfigs/mk.$* prep
79 %-install:
80 $(MAKE) -f buildconfigs/mk.$* build
82 %-dist: DESTDIR=$(DISTDIR)/install
83 %-dist: %-install
84 @: # do nothing
86 # Legacy dist target
87 %-build: %-dist
88 @: # do nothing
90 %-delete:
91 $(MAKE) -f buildconfigs/mk.$* delete
93 %-clean:
94 $(MAKE) -f buildconfigs/mk.$* clean
96 %-config:
97 $(MAKE) -f buildconfigs/mk.$* config
99 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
100 rm -rf tmp-$@
101 cp -al $(<D) tmp-$@
102 ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
103 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
104 rm -rf tmp-$@
106 %-xen.patch: ref-%/.valid-ref
107 rm -rf tmp-$@
108 cp -al $(<D) tmp-$@
109 ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
110 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
111 rm -rf tmp-$@
113 %-mrproper:
114 rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
115 rm -rf $*-xen.patch
117 .PHONY: config-update-pae
118 config-update-pae:
119 ifeq ($(XEN_TARGET_X86_PAE),y)
120 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)
121 else
122 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
123 endif
125 # never delete any intermediate files.
126 .SECONDARY: