]> git.cworth.org Git - obsolete/notmuch-old/blob - test/Makefile.local
revert: Removed top level --stderr= option
[obsolete/notmuch-old] / test / Makefile.local
1 # -*- makefile -*-
2
3 dir := test
4
5 extra_cflags += -I.
6
7 smtp_dummy_srcs =               \
8         $(notmuch_compat_srcs)  \
9         $(dir)/smtp-dummy.c
10
11 smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
12
13 $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a
14         $(call quiet,CC) -I. $^ -o $@
15
16 $(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a
17         $(call quiet,CC) -I. $^ -o $@ -ltalloc
18
19 random_corpus_deps =  $(dir)/random-corpus.o  $(dir)/database-test.o \
20                         notmuch-config.o command-line-arguments.o \
21                         lib/libnotmuch.a util/libutil.a \
22                         parse-time-string/libparse-time-string.a
23
24 $(dir)/random-corpus: $(random_corpus_deps)
25         $(call quiet,CXX) $(CFLAGS_FINAL) $^ -o $@ $(CONFIGURE_LDFLAGS)
26
27 $(dir)/smtp-dummy: $(smtp_dummy_modules)
28         $(call quiet,CC) $^ -o $@
29
30 $(dir)/symbol-test: $(dir)/symbol-test.o
31         $(call quiet,CXX) $^ -o $@ -Llib -lnotmuch $(XAPIAN_LDFLAGS)
32
33 $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
34         $(call quiet,CC) $^ -o $@
35
36 .PHONY: test check
37
38 TEST_BINARIES=$(dir)/arg-test \
39               $(dir)/hex-xcode \
40               $(dir)/random-corpus \
41               $(dir)/parse-time \
42               $(dir)/smtp-dummy \
43               $(dir)/symbol-test
44
45 test-binaries: $(TEST_BINARIES)
46
47 test:   all test-binaries
48         @${dir}/notmuch-test $(OPTIONS)
49
50 check: test
51
52 SRCS := $(SRCS) $(smtp_dummy_srcs)
53 CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o \
54          $(dir)/symbol-test $(dir)/symbol-test.o \
55          $(dir)/arg-test $(dir)/arg-test.o \
56          $(dir)/hex-xcode $(dir)/hex-xcode.o \
57          $(dir)/database-test.o \
58          $(dir)/random-corpus $(dir)/random-corpus.o \
59          $(dir)/parse-time $(dir)/parse-time.o \
60          $(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*