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] toos/blktap2: fix parallel Make.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] toos/blktap2: fix parallel Make.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 4 Jun 2009 14:18:11 +0900
Delivery-date: Wed, 03 Jun 2009 22:18:37 -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
User-agent: Mutt/1.5.6i
toos/blktap2: fix parallel Make.

sub make in tools/blktap2/daemon/lib and tools/lvd/lib
can be triggered many times at the same time which results in
weired link error because one target is linking a library while another
target is trying to recreate the library.

This patch makes it invoke submake only once.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/tools/blktap2/daemon/Makefile b/tools/blktap2/daemon/Makefile
--- a/tools/blktap2/daemon/Makefile
+++ b/tools/blktap2/daemon/Makefile
@@ -34,7 +34,10 @@ DEPS          = .*.d
 
 all: $(IBIN)
 
-blktapctrl: tapdisk-daemon.c $(OBJS) subdir-all-lib
+LIBS_DEPENDS := lib/libblktap.a lib/libblktap.so
+$(LIBS_DEPENDS):subdirs-all
+
+blktapctrl: tapdisk-daemon.c $(OBJS) $(LIBS_DEPENDS)
        $(CC) $(CFLAGS) -o blktapctrl tapdisk-daemon.c $(LDFLAGS) $(LIBS) 
$(OBJS)
 
 install: all
diff --git a/tools/blktap2/vhd/Makefile b/tools/blktap2/vhd/Makefile
--- a/tools/blktap2/vhd/Makefile
+++ b/tools/blktap2/vhd/Makefile
@@ -32,10 +32,13 @@ all: build
 
 build: $(IBIN)
 
-vhd-util: vhd-util.o subdir-all-lib
+LIBS_DEPENDS     := lib/libvhd.so lib/vhd.a
+$(LIBS_DEPENDS):subdirs-all
+
+vhd-util: vhd-util.o $(LIBS_DEPENDS)
        $(CC) $(CFLAGS) -o vhd-util vhd-util.o $(LDFLAGS) $(LIBS)
 
-vhd-update: vhd-update.o subdir-all-lib
+vhd-update: vhd-update.o $(LIBS_DEPENDS)
        $(CC) $(CFLAGS) -o vhd-update vhd-update.o $(LDFLAGS) $(LIBS)
 
 install: all


-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] toos/blktap2: fix parallel Make., Isaku Yamahata <=