ia64/xen-unstable

changeset 1467:8e6a772424a1

bitkeeper revision 1.960 (40cd7d81VzO6ptRUDTX_VC8yOFY9Ag)

Makefile cleanups. We now have a LINUX_SRC_PATH as well as LINUX_SRC in the
top level makefile. New make targets 'linux_XXX_config' and 'linux_XXX' configure
and build from the appropriate linux defconfig file. 'install' should install
both xen, the tools, and linux-xen.

Alson rename xen.dbg -> xen-syms
author iap10@labyrinth.cl.cam.ac.uk
date Mon Jun 14 10:27:13 2004 +0000 (2004-06-14)
parents 225b184bd62d
children a53cc9700ac8
files BitKeeper/etc/ignore Makefile linux-2.4.26-xen-sparse/arch/xen/Makefile tools/Makefile xen/Makefile xen/arch/x86/Makefile
line diff
     1.1 --- a/BitKeeper/etc/ignore	Fri Jun 11 22:32:04 2004 +0000
     1.2 +++ b/BitKeeper/etc/ignore	Mon Jun 14 10:27:13 2004 +0000
     1.3 @@ -29,3 +29,4 @@ xen/tools/elf-reloc
     1.4  xen/tools/figlet/figlet
     1.5  xen/xen
     1.6  xen/xen.*
     1.7 +xen/xen-syms
     2.1 --- a/Makefile	Fri Jun 11 22:32:04 2004 +0000
     2.2 +++ b/Makefile	Mon Jun 14 10:27:13 2004 +0000
     2.3 @@ -18,34 +18,47 @@ dist: all
     2.4  	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
     2.5  
     2.6  LINUX_VER        ?= $(shell ( /bin/ls -ld linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
     2.7 -LINUX_SRC        ?= linux-$(LINUX_VER).tar.gz
     2.8  LINUX_CONFIG_DIR ?= $(INSTALL_DIR)/boot
     2.9 +LINUX_SRC_PATH   ?= .:..
    2.10 +LINUX_SRC_X ?= $(firstword $(foreach dir,$(subst :, ,$(LINUX_SRC_PATH)),$(wildcard $(dir)/linux-$(LINUX_VER).tar.gz)))
    2.11  
    2.12 -pristine-linux-src:
    2.13 -	[ -e $(LINUX_SRC) ] || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O- > $(LINUX_SRC)
    2.14 +pristine-linux-src: 
    2.15 +ifneq ($(LINUX_SRC),)
    2.16 +	@[ -r "$(LINUX_SRC)" ] || (echo "Can not find linux src at $(LINUX_SRC)" && false)
    2.17 +LINUX_SRC_X = $(LINUX_SRC)
    2.18 +else 
    2.19 +ifeq ($(LINUX_SRC_X),)
    2.20 +	@echo "Can not find linux-$(LINUX_VER).tar.gz in path $(LINUX_SRC_PATH)"
    2.21 +	@wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O./linux-$(LINUX_VER).tar.gz
    2.22 +LINUX_SRC_X = ./linux-$(LINUX_VER).tar.gz 
    2.23 +endif
    2.24 +endif
    2.25  
    2.26  linux-$(LINUX_VER)-xen: pristine-linux-src
    2.27  	$(RM) -rf linux-$(LINUX_VER)-xen
    2.28 -	tar -x -z -f $(LINUX_SRC)
    2.29 +	tar -x -z -f $(LINUX_SRC_X)
    2.30  	mv linux-$(LINUX_VER) linux-$(LINUX_VER)-xen
    2.31  	( cd linux-$(LINUX_VER)-xen-sparse ; ./mkbuildtree ../linux-$(LINUX_VER)-xen )
    2.32  
    2.33 -config_%: linux-$(LINUX_VER)-xen
    2.34 +linux_%_config: 
    2.35  	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen mrproper
    2.36 -	cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config_,,$(@)) .config || $(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen $(subst config_,,$(@))_config
    2.37 +	cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst _config,,$(subst linux_,,$(@))) .config || $(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen $(subst linux_,,$(@))
    2.38  	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen oldconfig
    2.39  	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen dep
    2.40  
    2.41 -build_%: 
    2.42 -	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen bzImage
    2.43 -	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_NAME=$(subst build_,$(LINUX_VER)-,$(@)) prefix=$(INSTALL_DIR) install
    2.44 +linux:	
    2.45 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install	
    2.46 +
    2.47 +linux_%: 
    2.48 +	$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_NAME=$(subst linux_,$(LINUX_VER)-,$(@)) INSTALL_PATH=$(INSTALL_DIR) install
    2.49  
    2.50  
    2.51  world: dist
    2.52 -	$(MAKE) config_xenU 
    2.53 -	$(MAKE) build_xenU
    2.54 -	$(MAKE) config_xen0 
    2.55 -	$(MAKE) build_xen0
    2.56 +	$(MAKE) linux-$(LINUX_VER)-xen
    2.57 +	$(MAKE) linux_xenU_config
    2.58 +	$(MAKE) linux_xenU
    2.59 +	$(MAKE) linuc_xen0_config
    2.60 +	$(MAKE) linux_xen0
    2.61  
    2.62  
    2.63  clean: delete-symlinks
     3.1 --- a/linux-2.4.26-xen-sparse/arch/xen/Makefile	Fri Jun 11 22:32:04 2004 +0000
     3.2 +++ b/linux-2.4.26-xen-sparse/arch/xen/Makefile	Mon Jun 14 10:27:13 2004 +0000
     3.3 @@ -102,17 +102,15 @@ FORCE: ;
     3.4  bzImage: vmlinux
     3.5  	@$(MAKEBOOT) bzImage
     3.6  
     3.7 +INSTALL_NAME ?= $(KERNELRELEASE)
     3.8  install: bzImage
     3.9 -	mkdir -p $(prefix)/boot
    3.10 -	install -m0644 arch/$(ARCH)/boot/bzImage $(prefix)/boot/vmlinuz-$(INSTALL_NAME)
    3.11 -	install -m0644 vmlinux $(prefix)/boot/vmlinux-syms-$(INSTALL_NAME)
    3.12 -	install -m0664 .config $(prefix)/boot/config-$(INSTALL_NAME)
    3.13 +	mkdir -p $(INSTALL_PATH)/boot
    3.14 +	install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
    3.15 +	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
    3.16 +	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
    3.17  
    3.18 -dist: bzImage
    3.19 -	mkdir -p ../install/boot
    3.20 -	install -m0644 arch/$(ARCH)/boot/bzImage ../install/boot/vmlinuz-$(INSTALL_NAME)
    3.21 -	install -m0644 vmlinux ../install/boot/vmlinux-syms-$(INSTALL_NAME)
    3.22 -	install -m0664 .config ../install/boot/config-$(INSTALL_NAME)
    3.23 +dist: 
    3.24 +	$(MAKE) INSTALL_PATH=../install install
    3.25  
    3.26  %_config: arch/xen/defconfig-%
    3.27  	rm -f .config arch/xen/defconfig
     4.1 --- a/tools/Makefile	Fri Jun 11 22:32:04 2004 +0000
     4.2 +++ b/tools/Makefile	Mon Jun 14 10:27:13 2004 +0000
     4.3 @@ -32,5 +32,5 @@ clean:
     4.4  	$(MAKE) -C xentrace clean
     4.5  	$(MAKE) -C xenctl clean
     4.6  	$(MAKE) -C xend clean
     4.7 -	$(MAKE) -C xenmgr install
     4.8 +	$(MAKE) -C xenmgr clean
     4.9  
     5.1 --- a/xen/Makefile	Fri Jun 11 22:32:04 2004 +0000
     5.2 +++ b/xen/Makefile	Mon Jun 14 10:27:13 2004 +0000
     5.3 @@ -15,13 +15,13 @@ default: $(TARGET)
     5.4  	gzip -f -9 < $(TARGET) > $(TARGET).gz
     5.5  
     5.6  debug:	
     5.7 -	objdump -D -S $(TARGET).dbg > $(TARGET).s
     5.8 +	objdump -D -S $(TARGET)-syms > $(TARGET).s
     5.9  
    5.10  install: $(TARGET)
    5.11  	gzip -f -9 < $(TARGET) > $(TARGET).gz
    5.12  	mkdir -p $(prefix)/boot
    5.13  	install -m0644 $(TARGET).gz $(prefix)/boot
    5.14 -	install -m0644 $(TARGET).dbg $(prefix)/boot
    5.15 +	install -m0644 $(TARGET)-syms $(prefix)/boot
    5.16  
    5.17  dist: $(TARGET)
    5.18  	$(MAKE) prefix=`pwd`/../../install dist=yes install
     6.1 --- a/xen/arch/x86/Makefile	Fri Jun 11 22:32:04 2004 +0000
     6.2 +++ b/xen/arch/x86/Makefile	Mon Jun 14 10:27:13 2004 +0000
     6.3 @@ -15,8 +15,8 @@ endif
     6.4  # wrapping that with a low-memory bootstrapper.)
     6.5  default: boot/boot.o $(OBJS)
     6.6  	$(LD) -r -o arch.o $(OBJS)
     6.7 -	$(LD) $(LDFLAGS) boot/boot.o $(ALL_OBJS) -o $(TARGET).dbg
     6.8 -	objcopy -R .note -R .comment -S $(TARGET).dbg $(TARGET)
     6.9 +	$(LD) $(LDFLAGS) boot/boot.o $(ALL_OBJS) -o $(TARGET)-syms
    6.10 +	objcopy -R .note -R .comment -S $(TARGET)-syms $(TARGET)
    6.11  	$(BASEDIR)/tools/elf-reloc $(MONITOR_BASE) $(LOAD_BASE) $(TARGET)
    6.12  
    6.13  clean: