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] blktap2: fix makefile of vhd for parallel make

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] blktap2: fix makefile of vhd for parallel make
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 28 May 2009 12:51:21 +0900
Cc: dmeyer@xxxxxxxxx, jake.wires@xxxxxxxxxx
Delivery-date: Wed, 27 May 2009 20:57:19 -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
blktap2: fix makefile of vhd for parallel make

With parallel make, libvhd might not be created before
link resulting in link error. This patch guarantees it.

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

diff --git a/tools/blktap2/vhd/Makefile b/tools/blktap2/vhd/Makefile
--- a/tools/blktap2/vhd/Makefile
+++ b/tools/blktap2/vhd/Makefile
@@ -12,6 +12,9 @@ CFLAGS            += -Wno-unused
 CFLAGS            += -I../include
 CFLAGS            += -D_GNU_SOURCE
 
+SUBDIRS-y :=
+SUBDIRS-y += $(LIBDIR)
+
 ifeq ($(CONFIG_X86_64),y)
 CFLAGS            += -fPIC
 endif
@@ -29,27 +32,22 @@ DEPS               = .*.d
 
 all: build
 
-build: libvhd $(IBIN)
+build: $(IBIN)
 
-libvhd:
-       @set -e
-       $(MAKE) -C $(LIBDIR) all
-
-vhd-util: vhd-util.o
+vhd-util: vhd-util.o subdir-all-lib
        $(CC) $(CFLAGS) -o vhd-util vhd-util.o $(LIBS)
 
-vhd-update: vhd-update.o
+vhd-update: vhd-update.o subdir-all-lib
        $(CC) $(CFLAGS) -o vhd-update vhd-update.o $(LIBS)
 
 install: all
-       $(MAKE) -C $(LIBDIR) install
        $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
        $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INST_DIR)
 
 clean:
-       $(MAKE) -C $(LIBDIR) clean
        rm -rf *.o *~ $(DEPS) $(IBIN)
 
-.PHONY: all build clean install libvhd vhd-util vhd-update
+.PHONY: all build clean install vhd-util vhd-update
+all clean install: %: subdirs-%
 
 -include $(DEPS)


-- 
yamahata

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

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