ia64/xen-unstable

changeset 10707:30cdeb686b93

[BUILD] Fix re-use of existing config files in dist/install/boot.
- the name of the config file was computed incorrectly because of the
linux version number 4th digit being present in both LINUX_VER and
EXTRAVERSION extracted from the linux Makefile.
- DESTDIR was not set for the prep and config targets.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Sat Jul 08 19:22:34 2006 +0100 (2006-07-08)
parents 8e55c5c11475
children f986ead202dc
files buildconfigs/Rules.mk buildconfigs/mk.linux-2.6-xen
line diff
     1.1 --- a/buildconfigs/Rules.mk	Wed Jul 05 18:48:41 2006 +0100
     1.2 +++ b/buildconfigs/Rules.mk	Sat Jul 08 19:22:34 2006 +0100
     1.3 @@ -69,9 +69,6 @@ ref-%/.valid-ref: pristine-%/.valid-pris
     1.4  	touch $@ # update timestamp to avoid rebuild
     1.5  endif
     1.6  
     1.7 -%-prep:
     1.8 -	$(MAKE) -f buildconfigs/mk.$* prep
     1.9 -
    1.10  %-install:
    1.11  	$(MAKE) -f buildconfigs/mk.$* build
    1.12  
    1.13 @@ -83,15 +80,20 @@ endif
    1.14  %-build: %-dist
    1.15  	@: # do nothing
    1.16  
    1.17 +%-prep: DESTDIR=$(DISTDIR)/install
    1.18 +%-prep:
    1.19 +	$(MAKE) -f buildconfigs/mk.$* prep
    1.20 +
    1.21 +%-config: DESTDIR=$(DISTDIR)/install
    1.22 +%-config:
    1.23 +	$(MAKE) -f buildconfigs/mk.$* config
    1.24 +
    1.25  %-delete:
    1.26  	$(MAKE) -f buildconfigs/mk.$* delete
    1.27  
    1.28  %-clean:
    1.29  	$(MAKE) -f buildconfigs/mk.$* clean
    1.30  
    1.31 -%-config:
    1.32 -	$(MAKE) -f buildconfigs/mk.$* config
    1.33 -
    1.34  linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
    1.35  	rm -rf tmp-$@
    1.36  	cp -al $(<D) tmp-$@
     2.1 --- a/buildconfigs/mk.linux-2.6-xen	Wed Jul 05 18:48:41 2006 +0100
     2.2 +++ b/buildconfigs/mk.linux-2.6-xen	Sat Jul 08 19:22:34 2006 +0100
     2.3 @@ -5,6 +5,8 @@ EXTRAVERSION ?= xen
     2.4  
     2.5  LINUX_DIR    = linux-$(LINUX_VER)-$(EXTRAVERSION)
     2.6  
     2.7 +LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
     2.8 +
     2.9  include buildconfigs/Rules.mk
    2.10  
    2.11  # The real action starts here!
    2.12 @@ -25,8 +27,8 @@ build: $(LINUX_DIR)/include/linux/autoco
    2.13            LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_DIR) )
    2.14  	# Re-use config from install dir if one exits else use default config
    2.15  	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    2.16 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    2.17 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    2.18 +	[ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    2.19 +	  cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    2.20  	  || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
    2.21  		$(LINUX_DIR)/.config
    2.22  	# See if we need to munge config to enable PAE