ia64/xen-unstable

diff buildconfigs/mk.linux-2.6-xen0 @ 7217:303d51d0d578

Restructure the makefiles used to drive builds of linux 2.6 kernels.
A common file eliminates duplication across makefiles.

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 05 13:41:59 2005 +0100 (2005-10-05)
parents 06d84bf87159
children 3fcd0b9fd083
line diff
     1.1 --- a/buildconfigs/mk.linux-2.6-xen0	Wed Oct 05 13:32:00 2005 +0100
     1.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Wed Oct 05 13:41:59 2005 +0100
     1.3 @@ -1,51 +1,2 @@
     1.4 -
     1.5 -OS           = linux
     1.6 -
     1.7 -LINUX_SERIES = 2.6
     1.8 -LINUX_VER    = 2.6.12
     1.9 -
    1.10  EXTRAVERSION = xen0
    1.11 -
    1.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    1.13 -
    1.14 -include buildconfigs/Rules.mk
    1.15 -
    1.16 -.PHONY: build clean delete
    1.17 -
    1.18 -# The real action starts here!
    1.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    1.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    1.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    1.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    1.23 -	fi
    1.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    1.25 -
    1.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    1.27 -	rm -rf $(LINUX_DIR)
    1.28 -	cp -al $(<D) $(LINUX_DIR)
    1.29 -	# Apply arch-xen patches
    1.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    1.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    1.32 -	# Re-use config from install dir if one exits else use default config
    1.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    1.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    1.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    1.36 -	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
    1.37 -		$(LINUX_DIR)/.config
    1.38 -	# See if we need to munge config to enable PAE
    1.39 -	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    1.40 -	# Patch kernel Makefile to set EXTRAVERSION
    1.41 -	( cd $(LINUX_DIR) ; \
    1.42 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    1.43 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    1.44 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    1.45 -
    1.46 -config: CONFIGMODE = menuconfig
    1.47 -config: $(LINUX_DIR)/include/linux/autoconf.h
    1.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    1.49 -
    1.50 -clean::
    1.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    1.52 -
    1.53 -delete: 
    1.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
    1.55 +include buildconfigs/mk.linux-2.6-xen