summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.top
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-25 14:17:36 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-25 14:17:36 +0000
commit7b0f8f77593b0c270896c1cef77ea1d52eafcc64 (patch)
tree5dd8620140dc6a01fa5aeb47c3f691623b8a1b98 /makefiles/Makefile.top
parent9b6ee4c2880fe23e72b460758ea213aa4e3d32d7 (diff)
downloadbuildsystem-7b0f8f77593b0c270896c1cef77ea1d52eafcc64.tar.gz
buildsystem-7b0f8f77593b0c270896c1cef77ea1d52eafcc64.tar.bz2
Fix bugs in test handling.
Also in installation rule regeneration. svn path=/trunk/tools/buildsystem/; revision=6869
Diffstat (limited to 'makefiles/Makefile.top')
-rw-r--r--makefiles/Makefile.top9
1 files changed, 5 insertions, 4 deletions
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top
index 3935422..1bb97dd 100644
--- a/makefiles/Makefile.top
+++ b/makefiles/Makefile.top
@@ -127,8 +127,8 @@ $(eval $(foreach INC, $(MAKE_INCLUDES), $(call do_include,$(INC))))
# Calculate objects to build
OBJECTS := $(addprefix $(BUILDDIR)/,$(subst /,_,$(subst .c,.o,$(SOURCES))))
-TEST_BINARIES := $(addprefix $(BUILDDIR)/, \
- $(foreach ITEM,$(TEST_ITEMS),$(firstword $(ITEM))))
+bin_for_test = $(addprefix $(BUILDDIR)/,$(firstword $(subst :, ,$(ITEM))))
+TEST_BINARIES := $(foreach ITEM,$(TEST_ITEMS),$(bin_for_test))
# And the output filename
ifeq ($(findstring lib,$(COMPONENT_TYPE)),lib)
@@ -331,9 +331,9 @@ ifeq ($(MAKECMDGOALS),test)
endef
- bin_for_test = $(firstword $(subst :, ,$(ITEM)))
srcs_for_test = $(subst ;, ,$(lastword $(subst :, ,$(ITEM))))
- objs_for_test = $(addsuffix .o,$(basename $(srcs_for_test)))
+ objs_for_test = $(addprefix $(BUILDDIR)/, \
+ $(subst /,_,$(addsuffix .o,$(basename $(srcs_for_test)))))
$(eval $(foreach ITEM,$(TEST_ITEMS), \
$(foreach SOURCE,$(filter %.c,$(srcs_for_test)), \
@@ -345,6 +345,7 @@ ifeq ($(MAKECMDGOALS),test)
$(eval $(foreach ITEM,$(TEST_ITEMS), \
$(call link_test,$(objs_for_test),$(bin_for_test),TESTLIB,TESTLDFLAGS)))
+
endif
# Include dependency makefiles