diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-25 14:17:36 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-25 14:17:36 +0000 |
commit | 7b0f8f77593b0c270896c1cef77ea1d52eafcc64 (patch) | |
tree | 5dd8620140dc6a01fa5aeb47c3f691623b8a1b98 /makefiles | |
parent | 9b6ee4c2880fe23e72b460758ea213aa4e3d32d7 (diff) | |
download | buildsystem-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')
-rw-r--r-- | makefiles/Makefile.subdir | 6 | ||||
-rw-r--r-- | makefiles/Makefile.top | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/makefiles/Makefile.subdir b/makefiles/Makefile.subdir index 8e4e5e0..f81b2cc 100644 --- a/makefiles/Makefile.subdir +++ b/makefiles/Makefile.subdir @@ -55,8 +55,8 @@ ifeq ($(MAKECMDGOALS),test) sources = $(subst ;, ,$(lastword $(subst :, ,$(ITEM)))) # Append test items, prepending $(d) to each source file - TEST_ITEMS_$(d) := $(TEST_ITEMS_$(d)) $(foreach ITEM,$(TEST_ITEMS_$(d)), \ - $(binary):$(foreach TSRC,$(sources),$(addprefix $(d),$(TSRC)))); + TEST_ITEMS_$(d) := $(TEST_ITEMS_$(d)) $(foreach ITEM,$(DIR_TEST_ITEMS), \ + $(binary):$(foreach TSRC,$(sources),$(addprefix $(d),$(TSRC));)) TEST_ITEMS := $(TEST_ITEMS) $(TEST_ITEMS_$(d)) @@ -82,7 +82,7 @@ ifneq ($(DIR_INSTALL_ITEMS),) # Append items to install (along with install location), prepending $(d) # to each item in the file list INSTALL_ITEMS := $(INSTALL_ITEMS) $(foreach ITEM,$(INSTALL_ITEMS_$(d)), \ - $(dest_dir):$(foreach FILE,$(files),$(addprefix $(d),$(FILE)))); + $(dest_dir):$(foreach FILE,$(files),$(addprefix $(d),$(FILE));)) endif # Reset the inputs 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 |