ia64/xen-unstable

changeset 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 aad1d3e231ff
children e6ecfb4f4a24
files buildconfigs/mk.linux-2.6-xen buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU
line diff
     1.1 --- a/buildconfigs/mk.linux-2.6-xen	Wed Oct 05 13:32:00 2005 +0100
     1.2 +++ b/buildconfigs/mk.linux-2.6-xen	Wed Oct 05 13:41:59 2005 +0100
     1.3 @@ -4,7 +4,7 @@ OS           = linux
     1.4  LINUX_SERIES = 2.6
     1.5  LINUX_VER    = 2.6.12
     1.6  
     1.7 -EXTRAVERSION = xen
     1.8 +EXTRAVERSION ?= xen
     1.9  
    1.10  LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    1.11  
     2.1 --- a/buildconfigs/mk.linux-2.6-xen0	Wed Oct 05 13:32:00 2005 +0100
     2.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Wed Oct 05 13:41:59 2005 +0100
     2.3 @@ -1,51 +1,2 @@
     2.4 -
     2.5 -OS           = linux
     2.6 -
     2.7 -LINUX_SERIES = 2.6
     2.8 -LINUX_VER    = 2.6.12
     2.9 -
    2.10  EXTRAVERSION = xen0
    2.11 -
    2.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    2.13 -
    2.14 -include buildconfigs/Rules.mk
    2.15 -
    2.16 -.PHONY: build clean delete
    2.17 -
    2.18 -# The real action starts here!
    2.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    2.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    2.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    2.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    2.23 -	fi
    2.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    2.25 -
    2.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    2.27 -	rm -rf $(LINUX_DIR)
    2.28 -	cp -al $(<D) $(LINUX_DIR)
    2.29 -	# Apply arch-xen patches
    2.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    2.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    2.32 -	# Re-use config from install dir if one exits else use default config
    2.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    2.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    2.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    2.36 -	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
    2.37 -		$(LINUX_DIR)/.config
    2.38 -	# See if we need to munge config to enable PAE
    2.39 -	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    2.40 -	# Patch kernel Makefile to set EXTRAVERSION
    2.41 -	( cd $(LINUX_DIR) ; \
    2.42 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    2.43 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    2.44 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    2.45 -
    2.46 -config: CONFIGMODE = menuconfig
    2.47 -config: $(LINUX_DIR)/include/linux/autoconf.h
    2.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    2.49 -
    2.50 -clean::
    2.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    2.52 -
    2.53 -delete: 
    2.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
    2.55 +include buildconfigs/mk.linux-2.6-xen
     3.1 --- a/buildconfigs/mk.linux-2.6-xenU	Wed Oct 05 13:32:00 2005 +0100
     3.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Wed Oct 05 13:41:59 2005 +0100
     3.3 @@ -1,51 +1,2 @@
     3.4 -
     3.5 -OS           = linux
     3.6 -
     3.7 -LINUX_SERIES = 2.6
     3.8 -LINUX_VER    = 2.6.12
     3.9 -
    3.10  EXTRAVERSION = xenU
    3.11 -
    3.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    3.13 -
    3.14 -include buildconfigs/Rules.mk
    3.15 -
    3.16 -.PHONY: build clean delete
    3.17 -
    3.18 -# The real action starts here!
    3.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    3.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    3.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    3.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    3.23 -	fi
    3.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    3.25 -
    3.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    3.27 -	rm -rf $(LINUX_DIR)
    3.28 -	cp -al $(<D) $(LINUX_DIR)
    3.29 -	# Apply arch-xen patches
    3.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    3.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    3.32 -	# Re-use config from install dir if one exits else use default config
    3.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    3.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    3.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    3.36 -	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
    3.37 -		$(LINUX_DIR)/.config
    3.38 -	# See if we need to munge config to enable PAE
    3.39 -	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    3.40 -	# Patch kernel Makefile to set EXTRAVERSION
    3.41 -	( cd $(LINUX_DIR) ; \
    3.42 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    3.43 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    3.44 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    3.45 -
    3.46 -config: CONFIGMODE = menuconfig
    3.47 -config: $(LINUX_DIR)/include/linux/autoconf.h
    3.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    3.49 -
    3.50 -clean::
    3.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    3.52 -
    3.53 -delete: 
    3.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
    3.55 +include buildconfigs/mk.linux-2.6-xen