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] [PATCH] stubdom/ioemu link farm creation fixes

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] stubdom/ioemu link farm creation fixes
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 16 Sep 2008 12:38:50 +0100
Delivery-date: Tue, 16 Sep 2008 04:39:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Replace the stubdom/ioemu link farm creation in stubdom/Makefile,
with code which arranges that:
 * No symlinks are made for output files - in particular, any
   symlinks for .d files would be written through by the compiler
   and cause damage to the original tree and other strange
   behaviours
 * All subdirectories are made as local subdirectories rather than
   links
 * Any interrupted or half-completed creation of the link farm
   leaves the directory in a state where the link farming will be
   restarted
 * We use make's inherent ability to test for the existence of files
   rather than using [ -f ... ] at the start of the rule's commands
 * The list of files to be excluded from the link farm can be
   easily updated
etc.

This should fix some problems particularly with parallel builds,
or by-hand builds where directories are entered in other than the
usual order.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

diff -r 087008dfb005 stubdom/Makefile
--- a/stubdom/Makefile  Mon Sep 15 17:10:43 2008 +0100
+++ b/stubdom/Makefile  Tue Sep 16 12:31:25 2008 +0100
@@ -165,7 +165,26 @@ lwip-$(XEN_TARGET_ARCH): lwip-$(LWIP_VER
 $(XEN_ROOT)/tools/ioemu-dir:
        make -C $(XEN_ROOT)/tools ioemu-dir-find
 
-mk-headers-$(XEN_TARGET_ARCH): $(XEN_ROOT)/tools/ioemu-dir
+ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/ioemu-dir
+       mkdir -p ioemu
+ifeq ($(CONFIG_QEMU),ioemu)
+       [ -h ioemu/Makefile ] || ( cd ioemu && \
+         ln -sf ../$(XEN_ROOT)/tools/ioemu/* .)
+else
+       set -e;                                                                 
\
+       $(absolutify_xen_root);                                                 
\
+       cd ioemu;                                                               
\
+       src="$$XEN_ROOT/tools/ioemu-dir"; export src;                           
\
+       (cd $$src && find * -type d -print) | xargs mkdir -p;                   
\
+       (cd $$src && find *     ! -type l  -type f  $(addprefix ! -name ,       
\
+                       '*.[oda1]' 'config-*' config.mak qemu-dm qemu-img-xen   
\
+                       '*.html' '*.pod'                                        
\
+                       )) |                                                    
\
+           while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done
+endif
+       touch ioemu/linkfarm.stamp
+
+mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp
        mkdir -p include/xen && \
           ln -sf $(addprefix ../../,$(wildcard 
$(XEN_ROOT)/xen/include/public/*.h)) include/xen && \
           ln -sf $(addprefix ../../$(XEN_ROOT)/xen/include/public/,arch-ia64 
arch-x86 hvm io xsm) include/xen && \
@@ -184,22 +203,6 @@ mk-headers-$(XEN_TARGET_ARCH): $(XEN_ROO
          ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.c . && \
          ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \
          ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . )
-       mkdir -p ioemu
-ifeq ($(CONFIG_QEMU),ioemu)
-       [ -h ioemu/Makefile ] || ( cd ioemu && \
-         ln -sf ../$(XEN_ROOT)/tools/ioemu/* .)
-else
-       [ -h ioemu/Makefile ] || ( cd ioemu && \
-         ln -sf ../$(XEN_ROOT)/tools/ioemu-dir/* . && \
-          rm -fr i386-dm && \
-          rm -fr i386-stubdom && \
-          mkdir i386-dm && \
-          mkdir i386-stubdom && \
-         ln -sf $(CONFIG_QEMU)/i386-dm/* i386-dm/ && \
-         ln -sf $(CONFIG_QEMU)/i386-stubdom/* i386-stubdom/ )
-endif
-       [ ! -h ioemu/config-host.h ] || rm -f ioemu/config-host.h
-       [ ! -h ioemu/config-host.mak ] || rm -f ioemu/config-host.mak
        $(MAKE) -C $(MINI_OS) links
        touch mk-headers-$(XEN_TARGET_ARCH)
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] stubdom/ioemu link farm creation fixes, Ian Jackson <=