From db005ac3fe2c1f8755981b6d2576dd7acf2ac6ee Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 17 Nov 2017 14:55:50 -0600 Subject: [PATCH] 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. --- configure/RULES_TARGET | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/configure/RULES_TARGET b/configure/RULES_TARGET index f8e44db76..4e9cb6e05 100644 --- a/configure/RULES_TARGET +++ b/configure/RULES_TARGET @@ -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),)