WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] 05: parallel-make.patch

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] 05: parallel-make.patch
From: Adam Heath <doogie@xxxxxxxxxxxxx>
Date: Fri, 21 Jan 2005 11:42:52 -0600 (CST)
Delivery-date: Fri, 21 Jan 2005 17:45:28 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
===
Name: parallel-make.patch
Depends: INSTALL.patch, proper-depends.patch
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.
DiffStat:
 Makefile     |   60 +++++++++++++++++++++++------------------------------------
 xen/Makefile |    9 +++-----
 2 files changed, 28 insertions(+), 41 deletions(-)

===
Depends: INSTALL.patch, proper-depends.patch
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.

--- xen-2.0.3.orig/xen/Makefile
+++ xen-2.0.3/xen/Makefile
@@ -32,13 +32,12 @@
 dist: $(TARGET)
        $(MAKE) prefix=`pwd`/../dist/install dist=yes install

-clean:
-       $(MAKE) -C tools clean
-       $(MAKE) -C common clean
-       $(MAKE) -C drivers clean
-       $(MAKE) -C arch/$(TARGET_ARCH) clean
+clean: tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean
        rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
        rm -f include/asm-*/asm-offsets.h
+
+tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean : %.clean:
+       $(MAKE) -C $* clean

 $(TARGET): delete-unfresh-files
        [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
--- xen-2.0.3.orig/Makefile
+++ xen-2.0.3/Makefile
@@ -30,25 +31,25 @@

 # 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:
-       $(MAKE) -C xen install
+install: xen.install tools.install kernels docs.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,28 +63,23 @@
 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 && \
                $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true

 # Build all the various kernels and modules
 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 +90,14 @@
        $(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 +159,8 @@
        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
-
-linux26:
-       $(MAKE) linux-2.6-xen0-build
-       $(MAKE) linux-2.6-xenU-build
+linux24: linux-2.4-xen0-build linux-2.4-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
===



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>