ia64/xen-unstable

view buildconfigs/mk.linux-2.6-xen @ 8749:aeaa1f0dedd8

One more fix to the buildsystem ($^ is not $<).

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Fri Feb 03 10:00:15 2006 +0000 (2006-02-03)
parents 6b14b81dc5a8
children 47a2eb32002a
line source
2 OS = linux
4 LINUX_SERIES = 2.6
5 LINUX_VER = 2.6.16-rc1-git4
6 LINUX_SRCS = linux-2.6.15.tar.bz2 patch-2.6.16-rc1.bz2 patch-2.6.16-rc1-git4.bz2
7 LINUX_PDIR = linux-$(LINUX_VER)
9 EXTRAVERSION ?= xen
11 LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
13 include buildconfigs/Rules.mk
15 .PHONY: build clean delete
17 # The real action starts here!
18 build: $(LINUX_DIR)/include/linux/autoconf.h
19 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
20 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
21 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
22 fi
23 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
25 pristine-$(LINUX_PDIR)/.valid-srcs: $(LINUX_SRCS)
26 rm -rf tmp-pristine-$(LINUX_PDIR) $(@D)
27 mkdir -p tmp-pristine-$(LINUX_PDIR)
28 tar -C tmp-pristine-$(LINUX_PDIR) -jxf $<
29 -@rm tmp-pristine-$(LINUX_PDIR)/pax_global_header
30 mv tmp-pristine-$(LINUX_PDIR)/* $(@D)
31 @rm -rf tmp-pristine-$(LINUX_PDIR)
32 bzcat $(wordlist 2,$(words $^),$^) | patch -d $(@D) -p1
33 touch $(@D)/.hgskip
34 touch $@
36 pristine-linux-%.16-rc1-git4/.valid-pristine: pristine-$(LINUX_PDIR)/.valid-srcs
37 touch $@ # update timestamp to avoid rebuild
39 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
40 rm -rf $(LINUX_DIR)
41 cp -al $(<D) $(LINUX_DIR)
42 # Apply arch-xen patches
43 ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
44 LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
45 # Re-use config from install dir if one exits else use default config
46 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
47 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
48 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
49 || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
50 $(LINUX_DIR)/.config
51 # See if we need to munge config to enable PAE
52 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
53 # Patch kernel Makefile to set EXTRAVERSION
54 ( cd $(LINUX_DIR) ; \
55 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
56 rm -f Makefile ; mv Mk.tmp Makefile )
57 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
59 prep: $(LINUX_DIR)/include/linux/autoconf.h
61 config: CONFIGMODE = menuconfig
62 config: $(LINUX_DIR)/include/linux/autoconf.h
63 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
65 clean::
66 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
68 delete:
69 rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)