]> git.notmuchmail.org Git - notmuch/commitdiff
test: Include generated dependencies for test sources
authorAustin Clements <amdragon@MIT.EDU>
Fri, 1 Aug 2014 02:09:51 +0000 (22:09 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 6 Aug 2014 12:56:25 +0000 (09:56 -0300)
Previously the build system was generating automatic header
dependencies for test sources, but only smtp-dummy was in SRCS, so
only its dependencies were being included.  Add all of the test
sources to SRCS so that the root Makefile.local includes their
dependencies.

test/Makefile.local

index 1c85b18adc414ea69d5b491b3c87c97e0dd39c3e..916dd0bd6d347e51bf011fe23165e60576c2d91c 100644 (file)
@@ -37,12 +37,17 @@ $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
 
 .PHONY: test check
 
-TEST_BINARIES=$(dir)/arg-test \
-             $(dir)/hex-xcode \
-             $(dir)/random-corpus \
-             $(dir)/parse-time \
-             $(dir)/smtp-dummy \
-             $(dir)/symbol-test
+test_main_srcs=$(dir)/arg-test.c \
+             $(dir)/hex-xcode.c \
+             $(dir)/random-corpus.c \
+             $(dir)/parse-time.c \
+             $(dir)/smtp-dummy.c \
+             $(dir)/symbol-test.cc \
+
+test_srcs=$(test_main_srcs) $(dir)/database-test.c
+
+TEST_BINARIES := $(test_main_srcs:.c=)
+TEST_BINARIES := $(TEST_BINARIES:.cc=)
 
 test-binaries: $(TEST_BINARIES)
 
@@ -51,7 +56,7 @@ test: all test-binaries
 
 check: test
 
-SRCS := $(SRCS) $(smtp_dummy_srcs)
+SRCS := $(SRCS) $(test_srcs)
 CLEAN += $(TEST_BINARIES) $(addsuffix .o,$(TEST_BINARIES)) \
         $(dir)/database-test.o \
         $(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*