diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2005-01-22 21:43:33 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2005-01-22 21:43:33 +0000 |
commit | 2f2710b791a3061fab60d13491b1df26d79e2b5c (patch) | |
tree | e9a061eaab037c9573e6583fdc3762c0b13747c1 /Makefile | |
parent | 273e434815f5930823933b876dd987395bd18f01 (diff) | |
download | xen-2f2710b791a3061fab60d13491b1df26d79e2b5c.tar.gz xen-2f2710b791a3061fab60d13491b1df26d79e2b5c.tar.bz2 xen-2f2710b791a3061fab60d13491b1df26d79e2b5c.zip |
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
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 58 |
1 files changed, 23 insertions, 35 deletions
@@ -30,25 +30,25 @@ all: dist # install everything into the standard system directories # NB: install explicitly does not check that everything is up to date! -install: install-tools install-xen install-kernels install-docs +install: xen.install tools.install kernels docs.install -install-xen: - $(MAKE) -C xen install - -install-tools: - $(MAKE) -C tools install - -install-kernels: +kernels.install: cp -a $(INSTALL_DIR)/boot/* /boot/ cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/ cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/ cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/ -install-docs: - sh ./docs/check_pkgs && $(MAKE) -C docs install || true +docs.install: + sh ./docs/check_pkgs && $(MAKE) -C docs install || true + +xen.install tools.install: %.install: + $(MAKE) -C $* install + +xen.dist tools.dist: %.dist: + $(MAKE) -C $* dist # build and install everything into local dist directory -dist: xen tools kernels docs +dist: xen.dist tools.dist kernels docs.install $(INSTALL_DIR) $(DIST_DIR)/check $(INSTALL_DATA) ./COPYING $(DIST_DIR) $(INSTALL_DATA) ./README $(DIST_DIR) @@ -61,8 +61,7 @@ xen: tools: $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install -kernels: - for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done +kernels: $(addsuffix -build,$(XKERNELS)) docs: sh ./docs/check_pkgs && \ @@ -72,17 +71,13 @@ docs: kbuild: kernels # Delete the kernel build trees entirely -kdelete: - for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done +kdelete: $(addsuffix -clean,$(XKERNELS)) # Clean the kernel build trees -kclean: - for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done +kclean: $(addsuffix -clean,$(XKERNELS)) # Make patches from kernel sparse trees -mkpatches: - for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done - +mkpatches: $(addsuffix -xen.patch,$(ALLSPARSETREES)) # build xen, the tools, and a domain 0 plus unprivileged linux-xen images, # and place them in the install directory. 'make install' should then @@ -93,16 +88,14 @@ world: $(MAKE) dist # clean doesn't do a kclean -clean: - $(MAKE) -C xen clean - $(MAKE) -C tools clean - $(MAKE) -C docs clean +clean: xen.clean tools.clean docs.clean + +xen.clean tools.clean docs.clean: %.clean: + $(MAKE) -C $* clean # clean, but blow away kernel build tree plus tar balls -mrproper: clean +mrproper: clean $(addsuffix -delete,$(ALLKERNELS)) $(addsuffix -mrproper,$(ALLSPARSETREES)) rm -rf dist patches/tmp - for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done - for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done install-twisted: wget http://www.twistedmatrix.com/products/get-current.epy @@ -165,13 +158,8 @@ uninstall: rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*" # Legacy targets for compatibility -linux24: - $(MAKE) linux-2.4-xen0-build - $(MAKE) linux-2.4-xenU-build +linux24: linux-2.4-xen0-build linux-2.4-xenU-build -linux26: - $(MAKE) linux-2.6-xen0-build - $(MAKE) linux-2.6-xenU-build +linux26: linux-2.6-xen0-build linux-2.6-xenU-build -netbsd20: - $(MAKE) netbsd-2.0-xenU-build +netbsd20: netbsd-2.0-xenU-build |