ia64/xen-unstable

annotate 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
rev   line source
cl349@4443 1
cl349@4443 2 include Config.mk
cl349@3024 3
kaf24@7216 4 export DESTDIR
kaf24@7216 5
cl349@4889 6 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
cl349@4889 7 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
cl349@4889 8
cl349@2914 9 # Setup pristine search path
cl349@2914 10 PRISTINE_SRC_PATH ?= .:..
cl349@2914 11 vpath pristine-% $(PRISTINE_SRC_PATH)
cl349@2914 12
cl349@8706 13 # Let XEN_TARGET_ARCH override ARCH.
cl349@8706 14 ifeq ($(XEN_TARGET_ARCH),x86_32)
cl349@8706 15 LINUX_ARCH ?= i386
cl349@6982 16 else
cl349@8706 17 LINUX_ARCH ?= $(XEN_TARGET_ARCH)
cl349@6982 18 endif
cl349@6982 19
cl349@2858 20 # Expand Linux series to Linux version
cl349@2858 21 LINUX_SERIES ?= 2.6
vhanquez@8279 22 LINUX_VER ?= $(shell grep "^LINUX_VER" buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
cl349@2858 23
cl349@2914 24 # Setup Linux search path
cl349@2858 25 LINUX_SRC_PATH ?= .:..
cl349@2858 26 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
cl349@8742 27 vpath patch-%.bz2 $(LINUX_SRC_PATH)
cl349@2858 28
cl349@2858 29 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
cl349@2858 30 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
cl349@2858 31 linux-%.tar.bz2:
cl349@2914 32 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
iap10@5507 33 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
cl349@2858 34
cl349@8742 35 patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
cl349@8742 36 patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
cl349@8742 37 patch-%.bz2:
cl349@8742 38 @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
cl349@8742 39 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
cl349@8742 40
vh249@5767 41 pristine-%: pristine-%/.valid-pristine
vh249@5767 42 @true
vh249@5767 43
vh249@5728 44 pristine-%/.valid-pristine: %.tar.bz2
cl349@4889 45 rm -rf tmp-pristine-$* $(@D)
cl349@4889 46 mkdir -p tmp-pristine-$*
cl349@4889 47 tar -C tmp-pristine-$* -jxf $<
cl349@9345 48 -@rm -f tmp-pristine-$*/pax_global_header
cl349@4889 49 mv tmp-pristine-$*/* $(@D)
cl349@4889 50 @rm -rf tmp-pristine-$*
cl349@5746 51 touch $(@D)/.hgskip
iap10@2835 52 touch $@ # update timestamp to avoid rebuild
cl349@4871 53
cl349@4889 54 PATCHDIRS := $(wildcard patches/*-*)
cl349@4871 55
kaf24@6323 56 ifneq ($(PATCHDIRS),)
cl349@4889 57 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
cl349@4889 58
cl349@4889 59 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
cl349@4889 60 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
cl349@4889 61
kaf24@9660 62 .PHONY: clean
cl349@4889 63 clean::
cl349@4889 64 rm -f patches/*/.makedep
cl349@4889 65
cl349@4889 66 ref-%/.valid-ref: pristine-%/.valid-pristine
kaf24@7438 67 set -e
cl349@4889 68 rm -rf $(@D)
cl349@4889 69 cp -al $(<D) $(@D)
kaf24@7438 70 if [ -d patches/$* ] ; then \
kaf24@7781 71 for i in patches/$*/*.patch ; do patch -d $(@D) -p1 <$$i || exit 1 ; done ; \
kaf24@7438 72 fi
cl349@4871 73 touch $@ # update timestamp to avoid rebuild
kaf24@6323 74 endif
iap10@2835 75
vhanquez@8312 76 %-prep:
vhanquez@8312 77 $(MAKE) -f buildconfigs/mk.$* prep
vhanquez@8312 78
kaf24@7313 79 %-install:
kaf24@2978 80 $(MAKE) -f buildconfigs/mk.$* build
kaf24@2978 81
kaf24@7313 82 %-dist: DESTDIR=$(DISTDIR)/install
kaf24@7313 83 %-dist: %-install
kaf24@7313 84 @: # do nothing
kaf24@7313 85
kaf24@7313 86 # Legacy dist target
kaf24@7313 87 %-build: %-dist
kaf24@7313 88 @: # do nothing
kaf24@7313 89
kaf24@2978 90 %-delete:
kaf24@2978 91 $(MAKE) -f buildconfigs/mk.$* delete
kaf24@2978 92
kaf24@2978 93 %-clean:
kaf24@2978 94 $(MAKE) -f buildconfigs/mk.$* clean
kaf24@2978 95
cl349@3885 96 %-config:
cl349@3885 97 $(MAKE) -f buildconfigs/mk.$* config
cl349@3885 98
vhanquez@8280 99 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
vhanquez@8280 100 rm -rf tmp-$@
vhanquez@8280 101 cp -al $(<D) tmp-$@
kaf24@9706 102 ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
kaf24@9647 103 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
vhanquez@8280 104 rm -rf tmp-$@
vhanquez@8279 105
cl349@4889 106 %-xen.patch: ref-%/.valid-ref
iap10@2835 107 rm -rf tmp-$@
cl349@4889 108 cp -al $(<D) tmp-$@
kaf24@9706 109 ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
kaf24@9647 110 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
iap10@2835 111 rm -rf tmp-$@
iap10@2835 112
kaf24@9650 113 %-mrproper:
kaf24@5825 114 rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
cl349@2858 115 rm -rf $*-xen.patch
cl349@2884 116
kaf24@9660 117 .PHONY: config-update-pae
iap10@5894 118 config-update-pae:
iap10@5894 119 ifeq ($(XEN_TARGET_X86_PAE),y)
iap10@5894 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)
iap10@5894 121 else
iap10@6006 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
iap10@5894 123 endif
iap10@5894 124
cl349@2858 125 # never delete any intermediate files.
cl349@2858 126 .SECONDARY: