@@ -732,11 +732,11 @@ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
# $(run-via-rtld-prefix) is a command that, when prepended to the name
# of a program built with the newly built library, produces a command
# that, executed on the host for which the library is built, runs that
-# program. For tests listed in tests-static or xtests-static, it is
-# empty.
+# program. For tests listed in binaries-static-tests (from
+# tests-static, xtests-static, tests-internal-static), it is empty.
run-via-rtld-prefix = \
$(if $(strip $(filter $(notdir $(built-program-file)), \
- $(tests-static) $(xtests-static))),, $(rtld-prefix))
+ $(binaries-static-tests))),, $(rtld-prefix))
else
run-via-rtld-prefix =
endif
@@ -771,7 +771,8 @@ endif
$(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
$(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \
$(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
- $(addsuffix .d,$(tests) $(tests-internal) $(xtests) $(test-srcs))
+ $(addsuffix .d,$(tests) $(tests-internal) \
+ $(tests-internal-static) $(xtests) $(test-srcs))
ifeq ($(build-programs),yes)
+depfiles += $(addsuffix .d,$(others) $(sysdep-others))
endif
@@ -1297,8 +1298,8 @@ lib := testsuite
include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
-all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
- $(others) $(others-extras))
+all-nonlib := $(strip $(tests-internal) $(tests-internal-static) \
+ $(test-internal-extras) $(others) $(others-extras))
ifneq (,$(all-nonlib))
cpp-srcs-left = $(all-nonlib)
lib := nonlib
@@ -1457,10 +1458,12 @@ mostlyclean: common-mostlyclean
do-tests-clean:
-rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) \
$(tests-internal) \
+ $(tests-internal-static) \
$(xtests) \
$(test-srcs)) \
$(addsuffix .test-result,$(tests) \
$(tests-internal) \
+ $(tests-internal-static) \
$(xtests) \
$(test-srcs)))
@@ -1471,16 +1474,19 @@ common-mostlyclean:
$(others) $(sysdep-others) stubs \
$(addsuffix .o,$(tests) \
$(tests-internal) \
+ $(tests-internal-static) \
$(xtests) \
$(test-srcs) \
$(others) \
$(sysdep-others)) \
$(addsuffix .out,$(tests) \
$(tests-internal) \
+ $(tests-internal-static) \
$(xtests) \
$(test-srcs)) \
$(addsuffix .test-result,$(tests) \
$(tests-internal) \
+ $(tests-internal-static) \
$(xtests) \
$(test-srcs)))
-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
@@ -179,11 +179,12 @@ xtests:
ifeq ($(build-programs),yes)
binaries-all-notests = $(others) $(sysdep-others)
-binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) \
- $(tests-container)
+binaries-all-tests = $(tests) $(tests-internal) $(tests-internal-static) \
+ $(xtests) $(test-srcs) $(tests-container)
binaries-all = $(binaries-all-notests) $(binaries-all-tests)
binaries-static-notests = $(others-static)
-binaries-static-tests = $(tests-static) $(xtests-static)
+binaries-static-tests = \
+ $(tests-static) $(tests-internal-static) $(xtests-static)
binaries-static = $(binaries-static-notests) $(binaries-static-tests)
ifeq (yesyes,$(have-fpie)$(build-shared))
binaries-pie-tests = $(tests-pie) $(xtests-pie)
@@ -195,7 +196,8 @@ endif
binaries-mcheck-tests = $(tests-mcheck:%=%-mcheck)
else
binaries-all-notests =
-binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs)
+binaries-all-tests = $(tests) $(tests-internal) $(tests-internal-static) \
+ $(xtests) $(test-srcs)
binaries-all = $(binaries-all-tests)
binaries-static-notests =
binaries-static-tests =