|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] [PATCH] blktap2: fix makefile of vhd for parallel make
 
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>
 |  
- [Xen-devel] [PATCH] blktap2: fix makefile of vhd for parallel make,
Isaku Yamahata <=
 
 
 |  
  
 | 
    | 
  
  
    |   | 
    |