xen-vtx-unstable

view buildconfigs/mk.linux-2.6-xen0 @ 6728:5721657e8130

add XEN_LOCALVERSION to the dist building process

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@arcadians.cl.cam.ac.uk
date Sun Sep 11 16:34:38 2005 +0000 (2005-09-11)
parents dd668f7527cb
children 2c2c0b843f05 f752e0c873a6
line source
2 OS = linux
4 LINUX_SERIES = 2.6
5 LINUX_VER = 2.6.12
7 EXTRAVERSION = xen0
9 LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
10 LOCALSTR = CONFIG_LOCALVERSION=$(XEN_LOCALVERSION)
12 include buildconfigs/Rules.mk
14 .PHONY: build clean delete
16 # The real action starts here!
17 build: $(LINUX_DIR)/include/linux/autoconf.h
18 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
19 $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen modules ; \
20 $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
21 fi
22 $(MAKE) $(LOCALSTR) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
24 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
25 rm -rf $(LINUX_DIR)
26 cp -al $(<D) $(LINUX_DIR)
27 # Apply arch-xen patches
28 ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
29 ./mkbuildtree ../$(LINUX_DIR) )
30 # Re-use config from install dir if one exits else use default config
31 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
32 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
33 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
34 || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
35 $(LINUX_DIR)/.config
36 # See if we need to munge config to enable PAE
37 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
38 # Patch kernel Makefile to set EXTRAVERSION
39 ( cd $(LINUX_DIR) ; \
40 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
41 rm -f Makefile ; mv Mk.tmp Makefile )
42 $(MAKE) -C $(LINUX_DIR) ARCH=xen oldconfig
44 config: CONFIGMODE = menuconfig
45 config: $(LINUX_DIR)/include/linux/autoconf.h
46 $(MAKE) -C $(LINUX_DIR) ARCH=xen $(CONFIGMODE)
48 clean::
49 $(MAKE) -C $(LINUX_DIR) ARCH=xen clean
51 delete:
52 rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)