5 # save against changes in $(dir)
7 extra_cflags += -I$(srcdir)
10 $(notmuch_compat_srcs) \
13 smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
15 $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libnotmuch_util.a
16 $(call quiet,CC) $^ -o $@ $(LDFLAGS)
18 $(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libnotmuch_util.a
19 $(call quiet,CC) $^ -o $@ $(LDFLAGS) $(TALLOC_LDFLAGS)
21 random_corpus_deps = $(dir)/random-corpus.o $(dir)/database-test.o \
22 notmuch-config.o status.o command-line-arguments.o \
23 lib/libnotmuch.a util/libnotmuch_util.a \
24 parse-time-string/libparse-time-string.a
26 $(dir)/random-corpus: $(random_corpus_deps)
27 $(call quiet,CXX) $^ -o $@ $(LDFLAGS) $(CONFIGURE_LDFLAGS)
29 $(dir)/smtp-dummy: $(smtp_dummy_modules)
30 $(call quiet,CC) $^ -o $@ $(LDFLAGS)
32 $(dir)/symbol-test: $(dir)/symbol-test.o lib/$(LINKER_NAME)
33 $(call quiet,CXX) $^ -o $@ $(LDFLAGS) -Llib -lnotmuch $(XAPIAN_LDFLAGS)
35 $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
36 $(call quiet,CC) $^ -o $@ $(LDFLAGS)
38 $(dir)/make-db-version: $(dir)/make-db-version.o
39 $(call quiet,CXX) $^ -o $@ $(LDFLAGS) $(XAPIAN_LDFLAGS)
41 $(dir)/ghost-report: $(dir)/ghost-report.o
42 $(call quiet,CXX) $^ -o $@ $(LDFLAGS) $(XAPIAN_LDFLAGS)
46 test_main_srcs=$(dir)/arg-test.c \
48 $(dir)/random-corpus.c \
51 $(dir)/symbol-test.cc \
52 $(dir)/make-db-version.cc \
53 $(dir)/ghost-report.cc
55 test_srcs=$(test_main_srcs) $(dir)/database-test.c
57 TEST_BINARIES := $(test_main_srcs:.c=)
58 TEST_BINARIES := $(TEST_BINARIES:.cc=)
60 test-binaries: $(TEST_BINARIES)
62 test: all test-binaries
64 @echo 'Use "$(MAKE) V=1" to see the details for passing and known broken tests.'
65 @env NOTMUCH_TEST_QUIET=1 $(NOTMUCH_SRCDIR)/$(test_src_dir)/notmuch-test $(OPTIONS)
67 # The user has explicitly enabled quiet execution.
69 @env NOTMUCH_TEST_QUIET=1 $(NOTMUCH_SRCDIR)/$(test_src_dir)/notmuch-test $(OPTIONS)
71 @$(NOTMUCH_SRCDIR)/$(test_src_dir)/notmuch-test $(OPTIONS)
77 SRCS := $(SRCS) $(test_srcs)
78 CLEAN += $(TEST_BINARIES) $(addsuffix .o,$(TEST_BINARIES)) \
79 $(dir)/database-test.o \
80 $(dir)/corpora.mail $(dir)/test-results $(dir)/tmp.*