]> git.notmuchmail.org Git - notmuch/commitdiff
Avoid needlessly linking final notmuch binary against libXapian.
authorCarl Worth <cworth@cworth.org>
Wed, 7 Apr 2010 01:20:20 +0000 (18:20 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 7 Apr 2010 01:30:43 +0000 (18:30 -0700)
The libnotmuch.so library already does, so we don't need to do
it again. (Thanks to a Debian debhelper warning for pointing this
out.)

Makefile.local
lib/Makefile.local

index bb5d6762c9b091251546a50bd9a9d6dd1536bf86..b38370cc278aa256aafd67000c2cd2f0cf369bb5 100644 (file)
@@ -41,7 +41,8 @@ extra_cxxflags :=
 # Smash together user's values with our extra values
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
 # Smash together user's values with our extra values
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
-FINAL_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
+FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch
+FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
 
 .PHONY: all
 all: notmuch notmuch-shared notmuch.1.gz
 
 .PHONY: all
 all: notmuch notmuch-shared notmuch.1.gz
@@ -167,10 +168,10 @@ notmuch_client_srcs =             \
 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 
 notmuch: $(notmuch_client_modules) lib/libnotmuch.a
 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 
 notmuch: $(notmuch_client_modules) lib/libnotmuch.a
-       $(call quiet,CC $(CFLAGS)) $^ $(FINAL_LDFLAGS) -o $@
+       $(call quiet,CC $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
 
 notmuch-shared: $(notmuch_client_modules) lib/libnotmuch.so
 
 notmuch-shared: $(notmuch_client_modules) lib/libnotmuch.so
-       $(call quiet,CC $(CFLAGS)) -Llib -lnotmuch $(notmuch_client_modules) $(FINAL_LDFLAGS) -o $@
+       $(call quiet,CC $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
 
 notmuch.1.gz: notmuch.1
        gzip --stdout $^ > $@
 
 notmuch.1.gz: notmuch.1
        gzip --stdout $^ > $@
index ed6b25f4671eb768ac4b5216c168d28bde9614b8..0e3a4d15540c547f5186b33836daa0c89aa55aaf 100644 (file)
@@ -51,7 +51,7 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
        $(call quiet,AR) rcs $@ $^
 
 $(dir)/$(LIBNAME): $(libnotmuch_modules)
        $(call quiet,AR) rcs $@ $^
 
 $(dir)/$(LIBNAME): $(libnotmuch_modules)
-       $(call quiet,CXX $(CXXFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
+       $(call quiet,CXX $(CXXFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
 
 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
        ln -sf $(LIBNAME) $@
 
 $(dir)/$(SONAME): $(dir)/$(LIBNAME)
        ln -sf $(LIBNAME) $@