ia64/xen-unstable

changeset 2978:fd10b3d1ab9a

bitkeeper revision 1.1159.170.23 (41988b637H-s7zBc_EhrKCZog7CGNw)

Clean up multi-kernel build system.
author kaf24@freefall.cl.cam.ac.uk
date Mon Nov 15 10:56:35 2004 +0000 (2004-11-15)
parents ac9c463cbf78
children 02c4a1199884 43bbf6841c7f
files Makefile buildconfigs/Rules.mk
line diff
     1.1 --- a/Makefile	Sun Nov 14 17:43:02 2004 +0000
     1.2 +++ b/Makefile	Mon Nov 15 10:56:35 2004 +0000
     1.3 @@ -5,25 +5,23 @@
     1.4  DIST_DIR    ?= $(shell pwd)/dist
     1.5  INSTALL_DIR ?= $(DIST_DIR)/install
     1.6  
     1.7 -SOURCEFORGE_MIRROR := http://heanet.dl.sourceforge.net/sourceforge
     1.8 -#http://voxel.dl.sourceforge.net/sourceforge/
     1.9 -#http://easynews.dl.sourceforge.net/sourceforge
    1.10 +KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
    1.11 +# linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    1.12  
    1.13 -#KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.6-xenU mk.linux-2.4-xen0 mk.linux-2.4-xenU mk.netbsd-2.0-xenU
    1.14 -KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.6-xenU
    1.15 -
    1.16 -ALLKERNELS = $(patsubst buildconfigs/%,%,$(wildcard buildconfigs/mk.*))
    1.17 +ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
    1.18  ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
    1.19  
    1.20 -export INSTALL_DIR SOURCEFORGE_MIRROR
    1.21 +export INSTALL_DIR
    1.22 +
    1.23 +include buildconfigs/Rules.mk
    1.24  
    1.25  .PHONY:	all dist install xen tools kernels docs world clean mkpatches mrproper
    1.26  .PHONY:	kbuild kdelete kclean
    1.27  
    1.28 -all: 	dist
    1.29 +all: dist
    1.30  
    1.31  # build and install everything into local dist directory
    1.32 -dist:	xen tools kernels docs
    1.33 +dist: xen tools kernels docs
    1.34  	install -m0644 ./COPYING $(DIST_DIR)
    1.35  	install -m0644 ./README $(DIST_DIR)
    1.36  	install -m0755 ./install.sh $(DIST_DIR)
    1.37 @@ -47,27 +45,27 @@ xen:
    1.38  tools:
    1.39  	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
    1.40  
    1.41 -# Build all the various kernels and modules
    1.42  kernels:
    1.43 -	for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i build ; done
    1.44 +	for i in $(KERNELS) ; do $(MAKE) $$i-build ; done
    1.45  
    1.46  docs:
    1.47  	sh ./docs/check_pkgs && \
    1.48  		$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
    1.49  
    1.50 +# Build all the various kernels and modules
    1.51  kbuild: kernels
    1.52  
    1.53  # Delete the kernel build trees entirely
    1.54  kdelete:
    1.55 -	for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
    1.56 +	for i in $(KERNELS) ; do $(MAKE) $$i-delete ; done
    1.57  
    1.58  # Clean the kernel build trees
    1.59  kclean:
    1.60 -	for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i clean ; done
    1.61 +	for i in $(KERNELS) ; do $(MAKE) $$i-clean ; done
    1.62  
    1.63  # Make patches from kernel sparse trees
    1.64  mkpatches:
    1.65 -	for i in $(ALLSPARSETREES) ; do $(MAKE) -f buildconfigs/Rules.mk $$i-xen.patch ; done
    1.66 +	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
    1.67  
    1.68  
    1.69  # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
    1.70 @@ -87,8 +85,8 @@ clean:
    1.71  # clean, but blow away kernel build tree plus tar balls
    1.72  mrproper: clean
    1.73  	rm -rf dist patches/tmp
    1.74 -	for i in $(ALLKERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
    1.75 -	for i in $(ALLSPARSETREES) ; do $(MAKE) -f buildconfigs/Rules.mk $$i-mrproper ; done
    1.76 +	for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
    1.77 +	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
    1.78  
    1.79  install-twisted:
    1.80  	wget http://www.twistedmatrix.com/products/get-current.epy
    1.81 @@ -113,16 +111,14 @@ uninstall:
    1.82  	cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen 
    1.83  	rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
    1.84  
    1.85 -# Legacy target for compatibility
    1.86 +# Legacy targets for compatibility
    1.87  linux24:
    1.88 -	$(MAKE) -f buildconfigs/mk.linux-2.4-xen0 build
    1.89 -	$(MAKE) -f buildconfigs/mk.linux-2.4-xenU build
    1.90 +	$(MAKE) linux-2.4-xen0-build
    1.91 +	$(MAKE) linux-2.4-xenU-build
    1.92  
    1.93 -# Legacy target for compatibility
    1.94  linux26:
    1.95 -	$(MAKE) -f buildconfigs/mk.linux-2.6-xen0 build
    1.96 -	$(MAKE) -f buildconfigs/mk.linux-2.6-xenU build
    1.97 +	$(MAKE) linux-2.6-xen0-build
    1.98 +	$(MAKE) linux-2.6-xenU-build
    1.99  
   1.100 -# Legacy target for compatibility
   1.101  netbsd20:
   1.102 -	$(MAKE) -f buildconfigs/mk.netbsd-2.0-xenU build
   1.103 +	$(MAKE) netbsd-2.0-xenU-build
     2.1 --- a/buildconfigs/Rules.mk	Sun Nov 14 17:43:02 2004 +0000
     2.2 +++ b/buildconfigs/Rules.mk	Mon Nov 15 10:56:35 2004 +0000
     2.3 @@ -1,17 +1,10 @@
     2.4 -
     2.5 -# We expect these two to already be set if people 
     2.6 -# are using the top-level Makefile
     2.7 -DIST_DIR	?= $(shell pwd)/dist
     2.8 -INSTALL_DIR	?= $(DIST_DIR)/install
     2.9  
    2.10  .PHONY:	mkpatches mrproper
    2.11  
    2.12 -
    2.13  # Setup pristine search path
    2.14  PRISTINE_SRC_PATH	?= .:..
    2.15  vpath pristine-% $(PRISTINE_SRC_PATH)
    2.16  
    2.17 -
    2.18  # Expand Linux series to Linux version
    2.19  LINUX_SERIES	?= 2.6
    2.20  LINUX_VER	?= $(patsubst linux-%-xen-sparse,%,$(wildcard linux-$(LINUX_SERIES)*-xen-sparse))
    2.21 @@ -26,8 +19,6 @@ linux-%.tar.bz2:
    2.22  	@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
    2.23  	wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
    2.24  
    2.25 -
    2.26 -
    2.27  # Expand NetBSD release to NetBSD version
    2.28  NETBSD_RELEASE  ?= 2.0
    2.29  NETBSD_VER      ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
    2.30 @@ -45,9 +36,6 @@ netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).ta
    2.31  netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
    2.32  	ln -fs $< $@
    2.33  
    2.34 -
    2.35 -
    2.36 -
    2.37  pristine-%: %.tar.bz2
    2.38  	rm -rf tmp-$(@F) $@
    2.39  	mkdir -p tmp-$(@F)
    2.40 @@ -56,6 +44,15 @@ pristine-%: %.tar.bz2
    2.41  	touch $@ # update timestamp to avoid rebuild
    2.42  	@rm -rf tmp-$(@F)
    2.43  
    2.44 +%-build:
    2.45 +	$(MAKE) -f buildconfigs/mk.$* build
    2.46 +
    2.47 +%-delete:
    2.48 +	$(MAKE) -f buildconfigs/mk.$* delete
    2.49 +
    2.50 +%-clean:
    2.51 +	$(MAKE) -f buildconfigs/mk.$* clean
    2.52 +
    2.53  %-xen.patch: pristine-%
    2.54  	rm -rf tmp-$@
    2.55  	cp -al $< tmp-$@