diff --git a/Makefile.lib b/Makefile.lib index fad78f3a..4d70bb2d 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -153,13 +153,16 @@ clean-test: test-default: ifdef TEST_PROGS +TESTDEPS += $(TESTDEPS-yes) + $(TEST_PROGS): $(TESTDEPS) $$@.o $(call cmd,link) -TESTS = $(wildcard test-*) +TESTS = $(wildcard $(srcdir)test-*) $(TESTS): $(TEST_PROGS) - @echo "*** $@ ***"; $(call shellquote,$(SHELL)) $@ $(TEST_OPTS) + @echo "*** $(notdir $@) ***"; \ + $(call shellquote,$(SHELL)) $@ $(TEST_OPTS) test-default: $(TESTS) diff --git a/src/dom/test/Makefile b/src/dom/test/Makefile index 890e896d..3b7bd24d 100644 --- a/src/dom/test/Makefile +++ b/src/dom/test/Makefile @@ -11,8 +11,9 @@ TESTDEPS = \ $(top_builddir)/src/util/error.o \ $(top_builddir)/src/osdep/stub.o \ $(top_builddir)/src/util/hash.o \ - $(top_builddir)/src/util/memdebug.o \ $(top_builddir)/src/util/string.o \ $(top_builddir)/src/util/memory.o +TESTDEPS-$(CONFIG_DEBUG) += $(top_builddir)/src/util/memdebug.o \ + include $(top_srcdir)/Makefile.lib diff --git a/src/protocol/ftp/Makefile b/src/protocol/ftp/Makefile index 0437674d..9aa1dc75 100644 --- a/src/protocol/ftp/Makefile +++ b/src/protocol/ftp/Makefile @@ -12,9 +12,10 @@ TESTDEPS = \ $(top_builddir)/src/util/conv.o \ $(top_builddir)/src/util/error.o \ $(top_builddir)/src/util/hash.o \ - $(top_builddir)/src/util/memdebug.o \ $(top_builddir)/src/util/memory.o \ $(top_builddir)/src/util/string.o \ $(top_builddir)/src/util/time.o +TESTDEPS-$(CONFIG_DEBUG) += $(top_builddir)/src/util/memdebug.o + include $(top_srcdir)/Makefile.lib