Fix target dependencies for multiple jobs
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 12 Mar 2010 13:47:35 +0000 (14:47 +0100)
committerCarl Worth <cworth@cworth.org>
Thu, 1 Apr 2010 00:41:28 +0000 (17:41 -0700)
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
lib/Makefile.local

index f8489468eea069691eb372955f8445860a3bb78e..7105070b2a7b1ed9d6efd337898505a3b675076a 100644 (file)
@@ -18,9 +18,12 @@ libnotmuch_cxx_srcs =                \
        $(dir)/thread.cc
 
 libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
-$(dir)/libnotmuch.so : $(libnotmuch_modules)
+
+$(dir)/$(SONAME) : $(libnotmuch_modules)
        $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
-       ln -sf $(SONAME) $@
+
+$(dir)/libnotmuch.so: $(dir)/$(SONAME)
+       ln -fs $(SONAME) $@
 
 SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
-CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so *.so
+CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/libnotmuch.so *.so