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:
parent
a20d3e4bfe
commit
146ca09c43
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user