Skip to content
Snippets Groups Projects
Commit db005ac3 authored by Andrew Johnson's avatar Andrew Johnson
Browse files

RULES_TARGET: Define $(lib)_DIR before it is needed

TESTLIBRARY products were being installed, because an executable
that was linked to one added a dependency assuming it would be in
the INSTALL_LIB directory. The $(lib)_DIR was being set too late
for test libraries, so the fallback location was used instead.
This fix sets $(lib)_DIR for test libraries before any rules use it.
parent 0f0deb89
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,17 @@ $(foreach target, $(PROD) $(TESTPROD), \
#-----------------------------------------------------------------------
# These must be done before PROD2_template
define TESTLIBRARY_template
$(1)_DIR = .
TESTBUILD_LIBRARY += $$(if $$(strip $$($(1)_OBJSNAME) $$(LIBRARY_OBJS)),$(1),)
endef
$(foreach target, $(TESTLIBRARY), \
$(eval $(call TESTLIBRARY_template,$(strip $(target)))))
#-----------------------------------------------------------------------
define TARGET2_template
$(1)_LDLIBS += $$($(1)_LIBS)
$(1)_LDLIBS += $$(if $$(strip $$($(1)_LIBS_$(OS_CLASS))), \
......@@ -123,16 +134,6 @@ $(foreach target, $(LIBRARY), \
#-----------------------------------------------------------------------
define LIBRARY3_template
$(1)_DIR = .
TESTBUILD_LIBRARY += $$(if $$(strip $$($(1)_OBJSNAME) $$(LIBRARY_OBJS)),$(1),)
endef
$(foreach target, $(TESTLIBRARY), \
$(eval $(call LIBRARY3_template,$(strip $(target)))))
#-----------------------------------------------------------------------
define LOADABLE_LIBRARY_template
LOADABLE_BUILD_LIBRARY += $$(if $$(strip $$($(1)_OBJSNAME) $$(LIBRARY_OBJS)),$(1),)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment