Use MK_CHECK_USE_SANDBOX in tests/..., to deal with the fact that

tests/... is a special snowflake directory and using HAS_TESTS would
result in a nasty layering violation between bsd.tests.mk and
bsd.prog.mk.

Add reachover Makefile.inc's which get the default value from
Makefile.inc0 (inspired by gnu/usr.bin/binutils/Makefile.inc0).
This commit is contained in:
ngie 2017-08-02 22:24:08 +00:00
parent e2f1a933b1
commit e01efdbd81
7 changed files with 24 additions and 0 deletions

View File

@ -17,4 +17,5 @@ afterinstall: install-tests-local
install-tests-local: .PHONY
${INSTALL_SYMLINK} ../local/tests ${DESTDIR}${TESTSDIR}/local
.include "Makefile.inc0"
.include <bsd.test.mk>

9
tests/Makefile.inc0 Normal file
View File

@ -0,0 +1,9 @@
# $FreeBSD$
# tests/... doesn't conform to bsd.lib.mk and bsd.prog.mk, so specify a sane
# default for MK_CHECK_USE_SANDBOX. src.opts.mk will override the value if the
# user sets it to no.
MK_CHECK_USE_SANDBOX= yes
.include <src.opts.mk>

3
tests/etc/Makefile.inc Normal file
View File

@ -0,0 +1,3 @@
# $FreeBSD$
.include "${SRCTOP}/tests/Makefile.inc0"

View File

@ -1,3 +1,5 @@
# $FreeBSD$
WARNS?= 6
.include "${SRCTOP}/tests/Makefile.inc0"

View File

@ -0,0 +1,3 @@
# $FreeBSD$
.include "${SRCTOP}/tests/Makefile.inc0"

View File

@ -0,0 +1,3 @@
# $FreeBSD$
.include "${SRCTOP}/tests/Makefile.inc0"

View File

@ -0,0 +1,3 @@
# $FreeBSD$
.include "../Makefile.inc"