]> git.notmuchmail.org Git - notmuch/blobdiff - Makefile.local
Makefile: Add a "make test" target.
[notmuch] / Makefile.local
index 0f99e3f9d9d3c3253f6256ed3de1acf1d4b6a639..fed32c071c82eee9be8039e7c68729f317d3015c 100644 (file)
@@ -23,6 +23,9 @@ GPG_FILE=$(SHA1_FILE).asc
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
 FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch
+ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
+FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
+endif
 FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
 
 .PHONY: all
@@ -42,6 +45,10 @@ ifeq ($(shell cat .first-build-message),)
 endif
 endif
 
+.PHONY: test
+test: all
+       @./test/notmuch-test
+
 $(TAR_FILE):
        git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ HEAD > $(TAR_FILE).tmp
        echo $(VERSION) > version
@@ -199,7 +206,7 @@ notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 notmuch: $(notmuch_client_modules) lib/libnotmuch.a
        $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
 
-notmuch-shared: $(notmuch_client_modules) lib/libnotmuch.so
+notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
        $(call quiet,CXX $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
 
 notmuch.1.gz: notmuch.1