ia64/xen-unstable

changeset 1464:0d4ff32c9df0

bitkeeper revision 1.957 (40ca2b53ianOy58FRjELOpjpvzr1Rg)

improvements to top level Makefile.
install and linux build directories now live within the repository.
author iap10@labyrinth.cl.cam.ac.uk
date Fri Jun 11 21:59:47 2004 +0000 (2004-06-11)
parents 6bb0f401f1b2
children 2c6f86e0083e
files Makefile linux-2.4.26-xen-sparse/arch/xen/Makefile tools/misc/xen-clone
line diff
     1.1 --- a/Makefile	Fri Jun 11 15:04:40 2004 +0000
     1.2 +++ b/Makefile	Fri Jun 11 21:59:47 2004 +0000
     1.3 @@ -2,6 +2,8 @@
     1.4  # Grand Unified Makefile for Xen.
     1.5  #
     1.6  
     1.7 +INSTALL_DIR ?= $(shell pwd)/install
     1.8 +
     1.9  all: make-symlinks
    1.10  	$(MAKE) -C xen
    1.11  	$(MAKE) -C tools
    1.12 @@ -9,48 +11,55 @@ all: make-symlinks
    1.13  install: all
    1.14  	$(MAKE) -C xen install
    1.15  	$(MAKE) -C tools install
    1.16 +	$(shell cp -a install/boot/*$(LINUX_VER)* /boot/)
    1.17  
    1.18  dist: all
    1.19 -	$(MAKE) prefix=`pwd`/install dist=yes -C xen install
    1.20 -	$(MAKE) prefix=`pwd`/install dist=yes -C tools install
    1.21 +	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
    1.22 +	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
    1.23  
    1.24  LINUX_VER        ?= $(shell ( /bin/ls -ld linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
    1.25  LINUX_SRC        ?= linux-$(LINUX_VER).tar.gz
    1.26 -LINUX_CONFIG_DIR ?= install/boot
    1.27 +LINUX_CONFIG_DIR ?= $(INSTALL_DIR)/boot
    1.28  
    1.29 -linux: 
    1.30 -	# build whatever is in the current linux directory
    1.31 -	( cd ../linux-$(LINUX_VER)-xen ; ARCH=xen make bzImage )
    1.32 +pristine-linux-src:
    1.33 +	[ -e $(LINUX_SRC) ] || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O- > $(LINUX_SRC)
    1.34  
    1.35 -linux-src:
    1.36 -	[ -e $(LINUX_SRC) ] || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O- > linux-$(LINUX_VER).tar.gz
    1.37 -
    1.38 -mklinux-xen-tree: linux-src
    1.39 +linux-$(LINUX_VER)-xen: pristine-linux-src
    1.40  	$(RM) -rf linux-$(LINUX_VER)-xen
    1.41  	tar -x -z -f $(LINUX_SRC)
    1.42  	mv linux-$(LINUX_VER) linux-$(LINUX_VER)-xen
    1.43  	( cd linux-$(LINUX_VER)-xen-sparse ; ./mkbuildtree ../linux-$(LINUX_VER)-xen )
    1.44  
    1.45 -world: dist mklinux-xen-tree
    1.46 -	cp ../$(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-xenU .config || make -C linux-$(LINUX_VER)-xen ARCH=xen xenU_config
    1.47 -	make -C linux-$(LINUX_VER)-xen ARCH=xen oldconfig
    1.48 -	make -C linux-$(LINUX_VER)-xen ARCH=xen dep
    1.49 -	make -C linux-$(LINUX_VER)-xen ARCH=xen bzImage
    1.50 -	INSTALLSUFFIX=U make -C linux-$(LINUX_VER)-xen ARCH=xen dist
    1.51 -	make -C linux-$(LINUX_VER)-xen ARCH=xen mrproper
    1.52 -	cp ../$(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-xen0 .config || ARCH=xen make ARCH=xen xen0_config
    1.53 -	make -C linux-$(LINUX_VER)-xen ARCH=xen oldconfig
    1.54 -	make -C linux-$(LINUX_VER)-xen ARCH=xen dep
    1.55 -	make -C linux-$(LINUX_VER)-xen ARCH=xen bzImage
    1.56 -	INSTALLSUFFIX=0 make -C linux-$(LINUX_VER)-xen ARCH=xen dist
    1.57 +config_%: linux-$(LINUX_VER)-xen
    1.58 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen mrproper
    1.59 +	cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config_,,$(@)) .config || $(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen $(subst config_,,$(@))_config
    1.60 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen oldconfig
    1.61 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen dep
    1.62 +
    1.63 +build_%: 
    1.64 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen bzImage
    1.65 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_NAME=$(subst linux_,$(LINUX_VER)-,$(@)) prefix=$(INSTALL_DIR) install
    1.66 +
    1.67 +
    1.68 +world: dist
    1.69 +	$(MAKE) config_xenU 
    1.70 +	$(MAKE) build_xenU
    1.71 +	$(MAKE) config_xen0 
    1.72 +	$(MAKE) build_xen0
    1.73 +
    1.74  
    1.75  clean: delete-symlinks
    1.76  	$(MAKE) -C xen clean
    1.77  	$(MAKE) -C tools clean
    1.78  
    1.79 +mrproper: clean
    1.80 +	rm -rf install linux-$(LINUX_VER)-xen linux-$(LINUX_VER).tar.gz
    1.81 +
    1.82 +
    1.83  make-symlinks: delete-symlinks
    1.84  	ln -sf linux-$(LINUX_VER)-xen-sparse linux-xen-sparse
    1.85  
    1.86  delete-symlinks:
    1.87  	$(RM) linux-xen-sparse
    1.88 - 
    1.89 +
    1.90 +
     2.1 --- a/linux-2.4.26-xen-sparse/arch/xen/Makefile	Fri Jun 11 15:04:40 2004 +0000
     2.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/Makefile	Fri Jun 11 21:59:47 2004 +0000
     2.3 @@ -104,15 +104,15 @@ bzImage: vmlinux
     2.4  
     2.5  install: bzImage
     2.6  	mkdir -p $(prefix)/boot
     2.7 -	install -m0644 arch/$(ARCH)/boot/bzImage $(prefix)/boot/vmlinuz-$(KERNELRELEASE)$(INSTALLSUFFIX)
     2.8 -	install -m0644 vmlinux $(prefix)/boot/vmlinux-syms-$(KERNELRELEASE)$(INSTALLSUFFIX)
     2.9 -	install -m0664 .config $(prefix)/boot/config-$(KERNELRELEASE)$(INSTALLSUFFIX)
    2.10 +	install -m0644 arch/$(ARCH)/boot/bzImage $(prefix)/boot/vmlinuz-$(INSTALL_NAME)
    2.11 +	install -m0644 vmlinux $(prefix)/boot/vmlinux-syms-$(INSTALL_NAME)
    2.12 +	install -m0664 .config $(prefix)/boot/config-$(INSTALL_NAME)
    2.13  
    2.14  dist: bzImage
    2.15  	mkdir -p ../install/boot
    2.16 -	install -m0644 arch/$(ARCH)/boot/bzImage ../install/boot/vmlinuz-$(KERNELRELEASE)$(INSTALLSUFFIX)
    2.17 -	install -m0644 vmlinux ../install/boot/vmlinux-syms-$(KERNELRELEASE)$(INSTALLSUFFIX)
    2.18 -	install -m0664 .config ../install/boot/config-$(KERNELRELEASE)$(INSTALLSUFFIX)
    2.19 +	install -m0644 arch/$(ARCH)/boot/bzImage ../install/boot/vmlinuz-$(INSTALL_NAME)
    2.20 +	install -m0644 vmlinux ../install/boot/vmlinux-syms-$(INSTALL_NAME)
    2.21 +	install -m0664 .config ../install/boot/config-$(INSTALL_NAME)
    2.22  
    2.23  %_config: arch/xen/defconfig-%
    2.24  	rm -f .config arch/xen/defconfig
     3.1 --- a/tools/misc/xen-clone	Fri Jun 11 15:04:40 2004 +0000
     3.2 +++ b/tools/misc/xen-clone	Fri Jun 11 21:59:47 2004 +0000
     3.3 @@ -68,16 +68,14 @@ then
     3.4   LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/*linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!'`
     3.5  
     3.6   if [ -e ${LINUX_DIR}/linux-${LINUX_VER}.tar.gz ]  
     3.7 -  LINUX_SRC=${LINUX_DIR}/linux-${LINUX_VER}.tar.gz
     3.8 - elif
     3.9 -  wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${LINUX_VER}.tar.gz -O- > linux-${LINUX_VER}.tar.gz
    3.10 -  LINUX_SRC=''
    3.11 +  export LINUX_SRC=${LINUX_DIR}/linux-${LINUX_VER}.tar.gz
    3.12   fi
    3.13  
    3.14   cd ${DEST_BK_REP} 
    3.15 + ln -sf ../install install
    3.16   make world
    3.17   cd ../install/boot
    3.18 - ln -s vmlinux-${LINUX_VER}-xen0 xenolinux.gz
    3.19 + [ -r vmlinuz-${LINUX_VER}-xen0 ] && ln -s vmlinuz-${LINUX_VER}-xen0 xenolinux.gz
    3.20    
    3.21  else
    3.22   # old style repository without 'make world'