[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] toos/blktap2: fix parallel Make.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.