diff options
4 files changed, 20 insertions, 10 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 2db83a6fbf69..8af9f5fac44a 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -126,7 +126,8 @@ SUBDIR= ${SUBDIR_ORDERED} \
libyaml \
libz \
${_atf} \
- ${_clang}
+ ${_clang} \
+ ${_tests}
.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
@@ -251,6 +252,7 @@ _libtelnet= libtelnet
.if ${MK_TESTS} != "no"
_atf= atf
+_tests= tests
.if ${MK_UNBOUND} != "no"
diff --git a/lib/tests/Makefile b/lib/tests/Makefile
new file mode 100644
index 000000000000..935fd709df02
--- /dev/null
+++ b/lib/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+.include <bsd.own.mk>
+.PATH: ${.CURDIR:H:H}/tests
+.include <bsd.test.mk>
diff --git a/tests/Makefile b/tests/Makefile
index 1e2595470fdd..88386eb37009 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -2,10 +2,9 @@
.include <bsd.own.mk>
+SUBDIR= # still empty
.include <bsd.test.mk>
diff --git a/tests/README b/tests/README
index 2dfbc764da1f..416cea7f0aed 100644
--- a/tests/README
+++ b/tests/README
@@ -44,13 +44,12 @@ tree-- the top-level Kyuafile does not know which subdirectories may
exist upfront. Instead, such Kyuafile automatically detects, at
run-time, which */Kyuafile files exist and uses those directly.
-Similarly, every category subdirectory within src/tests/ provides the
-same Kyuafile with auto-discovery features. For example: src/tests/lib/
-holds a generic Makefile to install test-suite related material but such
-directory does not know upfront which libraries within src/lib/ will
-install tests. For this reason, the Kyuafile in src/tests/lib/ has to
-also use the auto-discovery features. The same applies for any other
-category subdirectory (e.g. bin, usr.sbin, etc.).
+Similarly, every directory in src/ that wants to install a Kyuafile to
+just recurse into other subdirectories reuses this Kyuafile with
+auto-discovery features. As an example, take a look at src/lib/tests/
+whose sole purpose is to install a Kyuafile into /usr/tests/lib/.
+The goal in this specific case is for /usr/tests/lib/ to be generated
+entirely from src/lib/.