]> git.notmuchmail.org Git - notmuch/blobdiff - test/Makefile.local
test: use sh.config for configuration
[notmuch] / test / Makefile.local
index 99324ba1e75b790cdc298337b8b6a51c35649ce0..1c85b18adc414ea69d5b491b3c87c97e0dd39c3e 100644 (file)
@@ -2,7 +2,9 @@
 
 dir := test
 
-extra_cflags += -I.
+# save against changes in $(dir)
+test_src_dir := $(dir)
+extra_cflags += -I$(srcdir)
 
 smtp_dummy_srcs =              \
        $(notmuch_compat_srcs)  \
@@ -11,10 +13,10 @@ smtp_dummy_srcs =           \
 smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
 
 $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a
-       $(call quiet,CC) -I. $^ -o $@
+       $(call quiet,CC) $^ -o $@
 
 $(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a
-       $(call quiet,CC) -I. $^ -o $@ -ltalloc
+       $(call quiet,CC) $^ $(TALLOC_LDFLAGS) -o $@
 
 random_corpus_deps =  $(dir)/random-corpus.o  $(dir)/database-test.o \
                        notmuch-config.o command-line-arguments.o \
@@ -45,7 +47,7 @@ TEST_BINARIES=$(dir)/arg-test \
 test-binaries: $(TEST_BINARIES)
 
 test:  all test-binaries
-       @${dir}/notmuch-test $(OPTIONS)
+       @${test_src_dir}/notmuch-test $(OPTIONS)
 
 check: test