1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Improve support for running 'make test' when srcdir != builddir

Additionally, also make TESTDEPS conditionally contain memdebug object
binary only if CONFIG_DEBUG is yes.
This commit is contained in:
Jonas Fonseca 2006-01-03 19:04:17 +01:00 committed by Jonas Fonseca
parent a20d3e4bfe
commit 146ca09c43
3 changed files with 9 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -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