ia64/xen-unstable

changeset 3494:4bbe824cb519

bitkeeper revision 1.1159.223.21 (41f2c905sBZq8YH0a-M9_-ucSA_KAQ)

Description: support parallellism better
Using shell for loops doesn't allow make to run it the most parallel
modes. Use patsubst/addsuffix tricks to make this work.

From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Jan 22 21:43:33 2005 +0000 (2005-01-22)
parents 119c53bf0d16
children dde87d5385db
files Makefile xen/Makefile
line diff
     1.1 --- a/Makefile	Sat Jan 22 21:39:35 2005 +0000
     1.2 +++ b/Makefile	Sat Jan 22 21:43:33 2005 +0000
     1.3 @@ -30,25 +30,25 @@ all: dist
     1.4  
     1.5  # install everything into the standard system directories
     1.6  # NB: install explicitly does not check that everything is up to date!
     1.7 -install: install-tools install-xen install-kernels install-docs
     1.8 -
     1.9 -install-xen:
    1.10 -	$(MAKE) -C xen install
    1.11 +install: xen.install tools.install kernels docs.install
    1.12  
    1.13 -install-tools:
    1.14 -	$(MAKE) -C tools install
    1.15 -
    1.16 -install-kernels:
    1.17 +kernels.install:
    1.18  	cp -a $(INSTALL_DIR)/boot/* /boot/
    1.19  	cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/
    1.20  	cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/
    1.21  	cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/
    1.22  
    1.23 -install-docs:
    1.24 -	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    1.25 +docs.install:
    1.26 +	sh ./docs/check_pkgs &&	$(MAKE) -C docs install || true
    1.27 +
    1.28 +xen.install tools.install: %.install:
    1.29 +	$(MAKE) -C $* install
    1.30 +
    1.31 +xen.dist tools.dist: %.dist:
    1.32 +	$(MAKE) -C $* dist
    1.33  
    1.34  # build and install everything into local dist directory
    1.35 -dist: xen tools kernels docs
    1.36 +dist: xen.dist tools.dist kernels docs.install
    1.37  	$(INSTALL_DIR) $(DIST_DIR)/check
    1.38  	$(INSTALL_DATA) ./COPYING $(DIST_DIR)
    1.39  	$(INSTALL_DATA) ./README $(DIST_DIR)
    1.40 @@ -61,8 +61,7 @@ xen:
    1.41  tools:
    1.42  	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
    1.43  
    1.44 -kernels:
    1.45 -	for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done
    1.46 +kernels: $(addsuffix -build,$(XKERNELS))
    1.47  
    1.48  docs:
    1.49  	sh ./docs/check_pkgs && \
    1.50 @@ -72,17 +71,13 @@ docs:
    1.51  kbuild: kernels
    1.52  
    1.53  # Delete the kernel build trees entirely
    1.54 -kdelete:
    1.55 -	for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
    1.56 +kdelete: $(addsuffix -clean,$(XKERNELS))
    1.57  
    1.58  # Clean the kernel build trees
    1.59 -kclean:
    1.60 -	for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
    1.61 +kclean: $(addsuffix -clean,$(XKERNELS))
    1.62  
    1.63  # Make patches from kernel sparse trees
    1.64 -mkpatches:
    1.65 -	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
    1.66 -
    1.67 +mkpatches: $(addsuffix -xen.patch,$(ALLSPARSETREES))
    1.68  
    1.69  # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
    1.70  # and place them in the install directory. 'make install' should then
    1.71 @@ -93,16 +88,14 @@ world:
    1.72  	$(MAKE) dist
    1.73  
    1.74  # clean doesn't do a kclean
    1.75 -clean: 
    1.76 -	$(MAKE) -C xen clean
    1.77 -	$(MAKE) -C tools clean
    1.78 -	$(MAKE) -C docs clean
    1.79 +clean: xen.clean tools.clean docs.clean
    1.80 +
    1.81 +xen.clean tools.clean docs.clean: %.clean:
    1.82 +	$(MAKE) -C $* clean
    1.83  
    1.84  # clean, but blow away kernel build tree plus tar balls
    1.85 -mrproper: clean
    1.86 +mrproper: clean $(addsuffix -delete,$(ALLKERNELS)) $(addsuffix -mrproper,$(ALLSPARSETREES))
    1.87  	rm -rf dist patches/tmp
    1.88 -	for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
    1.89 -	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
    1.90  
    1.91  install-twisted:
    1.92  	wget http://www.twistedmatrix.com/products/get-current.epy
    1.93 @@ -165,13 +158,8 @@ uninstall:
    1.94  	rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
    1.95  
    1.96  # Legacy targets for compatibility
    1.97 -linux24:
    1.98 -	$(MAKE) linux-2.4-xen0-build
    1.99 -	$(MAKE) linux-2.4-xenU-build
   1.100 +linux24: linux-2.4-xen0-build linux-2.4-xenU-build
   1.101  
   1.102 -linux26:
   1.103 -	$(MAKE) linux-2.6-xen0-build
   1.104 -	$(MAKE) linux-2.6-xenU-build
   1.105 +linux26: linux-2.6-xen0-build linux-2.6-xenU-build
   1.106  
   1.107 -netbsd20:
   1.108 -	$(MAKE) netbsd-2.0-xenU-build
   1.109 +netbsd20: netbsd-2.0-xenU-build
     2.1 --- a/xen/Makefile	Sat Jan 22 21:39:35 2005 +0000
     2.2 +++ b/xen/Makefile	Sat Jan 22 21:43:33 2005 +0000
     2.3 @@ -32,14 +32,13 @@ install: $(TARGET).gz
     2.4  dist: $(TARGET)
     2.5  	$(MAKE) prefix=`pwd`/../dist/install dist=yes install
     2.6  
     2.7 -clean:
     2.8 -	$(MAKE) -C tools clean
     2.9 -	$(MAKE) -C common clean
    2.10 -	$(MAKE) -C drivers clean
    2.11 -	$(MAKE) -C arch/$(TARGET_ARCH) clean
    2.12 +clean: tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean
    2.13  	rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
    2.14  	rm -f include/asm-*/asm-offsets.h
    2.15  
    2.16 +tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean : %.clean:
    2.17 +	$(MAKE) -C $* clean
    2.18 +
    2.19  $(TARGET): delete-unfresh-files
    2.20  	[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
    2.21  	$(MAKE) -C tools